Commit ee1d9010 authored by Petri Hintukainen's avatar Petri Hintukainen

ecma167: fix allocation size when there are no allocation descriptors

parent 32248ed8
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment