Skip to content
Permalink
Browse files Browse the repository at this point in the history
fixed potential crash - cf #1263
  • Loading branch information
jeanlf committed Jul 7, 2019
1 parent 4ea0281 commit 6170024
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/isomedia/box_code_apple.c
Expand Up @@ -112,14 +112,15 @@ GF_Err ilst_item_box_read(GF_Box *s,GF_BitStream *bs)
if (sub_type == GF_ISOM_BOX_TYPE_DATA ) {
e = gf_isom_box_parse(&a, bs);

if (!e && ptr->size < a->size) {
if (!e && a && (ptr->size < a->size)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[isom] not enough bytes in box %s: %d left, reading %d (file %s, line %d)\n", gf_4cc_to_str(ptr->type), ptr->size, a->size, __FILE__, __LINE__ )); \
e = GF_ISOM_INVALID_FILE;
}
if (e) {
if (a) gf_isom_box_del(a);
return e;
}
if (!a) return GF_NON_COMPLIANT_BITSTREAM;

ISOM_DECREASE_SIZE(ptr, a->size);

Expand Down

0 comments on commit 6170024

Please sign in to comment.