Skip to content

Commit 388ecce

Browse files
committed
fixed #1587
1 parent 362fc48 commit 388ecce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/isomedia/box_code_base.c

+4
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,10 @@ GF_Err url_box_read(GF_Box *s, GF_BitStream *bs)
580580
ptr->location = (char*)gf_malloc((u32) ptr->size);
581581
if (! ptr->location) return GF_OUT_OF_MEM;
582582
gf_bs_read_data(bs, ptr->location, (u32)ptr->size);
583+
if (ptr->location[ptr->size-1]) {
584+
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] url box location is not 0-terminated\n" ));
585+
return GF_ISOM_INVALID_FILE;
586+
}
583587
}
584588
return GF_OK;
585589
}

0 commit comments

Comments
 (0)