Skip to content

Commit

Permalink
fixed #2255
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Sep 12, 2022
1 parent 4c77303 commit 7751077
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/isomedia/box_code_base.c
Expand Up @@ -12886,11 +12886,12 @@ GF_Err xtra_box_read(GF_Box *s, GF_BitStream *bs)
prop_type = gf_bs_read_u16(bs);
prop_size -= 6;
ISOM_DECREASE_SIZE_NO_ERR(ptr, prop_size)
//add 2 extra bytes for UTF16 case string dump
data2 = gf_malloc(sizeof(char) * (prop_size+2));
//add 3 extra bytes for UTF16 case string dump (3 because we need 0-aligned short value)
data2 = gf_malloc(sizeof(char) * (prop_size+3));
gf_bs_read_data(bs, data2, prop_size);
data2[prop_size] = 0;
data2[prop_size+1] = 0;
data2[prop_size+2] = 0;
tag_size-=prop_size;
} else {
prop_size = 0;
Expand Down

0 comments on commit 7751077

Please sign in to comment.