Skip to content
Permalink
Browse files Browse the repository at this point in the history
fixed #1703
  • Loading branch information
jeanlf committed Mar 11, 2021
1 parent c4a5109 commit 8986422
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/isomedia/box_code_drm.c
Expand Up @@ -876,8 +876,17 @@ GF_Err tenc_box_read(GF_Box *s, GF_BitStream *bs)
ISOM_DECREASE_SIZE(ptr, 1);
iv_size = ptr->key_info[20] = gf_bs_read_u8(bs);
ISOM_DECREASE_SIZE(ptr, ptr->key_info[20]);
if ((iv_size!=8) && (iv_size!=16)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid constant IV size %d, must be 8 or 16\n", (u32) iv_size));
ptr->key_info[20] = 16;
return GF_NON_COMPLIANT_BITSTREAM;
}
gf_bs_read_data(bs, ptr->key_info+21, iv_size);
}
else if ((iv_size!=0) && (iv_size!=8) && (iv_size!=16)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid IV size %d, must be 0, 8 or 16\n", (u32) iv_size));
return GF_NON_COMPLIANT_BITSTREAM;
}
return GF_OK;
}

Expand Down

0 comments on commit 8986422

Please sign in to comment.