Skip to content

Commit

Permalink
fixed #2062
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Jan 21, 2022
1 parent bb9ee4c commit 827d849
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/isomedia/box_code_base.c
Expand Up @@ -242,9 +242,10 @@ GF_Err cprt_box_read(GF_Box *s,GF_BitStream *bs)
}
if (ptr->size) {
u32 bytesToRead = (u32) ptr->size;
ptr->notice = (char*)gf_malloc(bytesToRead * sizeof(char));
ptr->notice = (char*)gf_malloc((bytesToRead+1) * sizeof(char));
if (ptr->notice == NULL) return GF_OUT_OF_MEM;
gf_bs_read_data(bs, ptr->notice, bytesToRead);
ptr->notice[bytesToRead] = 0;
}
return GF_OK;
}
Expand Down

0 comments on commit 827d849

Please sign in to comment.