[libbluray-devel] ecma167: fix allocation size when there are no allocation descriptors

Petri Hintukainen git at videolan.org
Mon Jun 20 17:05:00 CEST 2016


libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sat Jun 18 15:16:21 2016 +0300| [ee1d9010fff23b2cea1cef5adc702d69f05afeaa] | committer: Petri Hintukainen

ecma167: fix allocation size when there are no allocation descriptors

> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=ee1d9010fff23b2cea1cef5adc702d69f05afeaa
---

 src/ecma167.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ecma167.c b/src/ecma167.c
index b7b87a6..1bbf2fd 100644
--- a/src/ecma167.c
+++ b/src/ecma167.c
@@ -272,7 +272,7 @@ static struct file_entry *_decode_file_entry(const uint8_t *p, size_t size,
             return NULL;
     }
 
-    if (content_inline) {
+    if (num_ad < 1) {
         fe = (struct file_entry *)calloc(1, sizeof(struct file_entry) + l_ad);
     } else {
         fe = (struct file_entry *)calloc(1, sizeof(struct file_entry) + sizeof(struct long_ad) * (num_ad - 1));



More information about the libbluray-devel mailing list