Skip to content

Commit ec64c7b

Browse files
committed
fixed #1786 (fuzz)
1 parent 0a85029 commit ec64c7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/isomedia/box_code_meta.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -566,10 +566,13 @@ GF_Err infe_box_read(GF_Box *s, GF_BitStream *bs)
566566
ptr->content_type = (char*)gf_malloc(sizeof(char)*string_len);
567567
if (!ptr->content_type) return GF_OUT_OF_MEM;
568568
memcpy(ptr->content_type, buf+string_start, string_len);
569-
} else {
569+
} else if (!ptr->content_encoding) {
570570
ptr->content_encoding = (char*)gf_malloc(sizeof(char)*string_len);
571571
if (!ptr->content_encoding) return GF_OUT_OF_MEM;
572572
memcpy(ptr->content_encoding, buf+string_start, string_len);
573+
} else {
574+
//we could throw an error but we silently accept this infe
575+
break;
573576
}
574577
string_start += string_len;
575578
string_len = 0;

0 commit comments

Comments
 (0)