Skip to content

Commit

Permalink
fix one possible crash when decoding iamf bitstream file
Browse files Browse the repository at this point in the history
  • Loading branch information
yilun-zhangs committed Aug 22, 2024
1 parent caeae33 commit d70de50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/src/iamf_dec/IAMF_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -2964,7 +2964,7 @@ static int iamf_decoder_internal_init(IAMF_DecoderHandle handle,
IAMF_OBU obj;
ia_logi("Without magic code flag.");
while (pos < size) {
consume = IAMF_OBU_split(data, size, &obj);
consume = IAMF_OBU_split(data + pos, size - pos, &obj);
if (!consume || obj.type == IAMF_OBU_SEQUENCE_HEADER) {
ia_logi("Get magic code.");
break;
Expand Down

0 comments on commit d70de50

Please sign in to comment.