Skip to content

Commit

Permalink
fixed bug in aieb box read
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Jan 18, 2024
1 parent 0ff4062 commit c2c6f6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/isomedia/box_code_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1757,14 +1757,15 @@ GF_Err aeib_box_read(GF_Box *s, GF_BitStream *bs)
GF_AdobeEncryptionInfoBox *ptr = (GF_AdobeEncryptionInfoBox*)s;
u32 len;

ISOM_DECREASE_SIZE(ptr, 1);
if (!ptr->size)
ISOM_DECREASE_SIZE(ptr, 1);

len = (u32) ptr->size - 1;
if (len) {
ptr->enc_algo = (char *)gf_malloc(len*sizeof(char));
if (!ptr->enc_algo) return GF_OUT_OF_MEM;
gf_bs_read_data(bs, ptr->enc_algo, len);
}
ISOM_DECREASE_SIZE(ptr, 1);
ptr->key_length = gf_bs_read_u8(bs);
ptr->size = 0;
return GF_OK;
Expand Down

0 comments on commit c2c6f6c

Please sign in to comment.