mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avcodec/wmaprodec: Check packet size
Fixes: left shift of negative value -25824 Fixes: 27754/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-5760255962906624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0a0b92b4b2
commit
69aeba8a19
1 changed files with 6 additions and 0 deletions
|
|
@ -1721,6 +1721,12 @@ static int decode_packet(AVCodecContext *avctx, WMAProDecodeCtx *s,
|
|||
}
|
||||
} else {
|
||||
int frame_size;
|
||||
|
||||
if (avpkt->size < s->next_packet_start) {
|
||||
s->packet_loss = 1;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
s->buf_bit_size = (avpkt->size - s->next_packet_start) << 3;
|
||||
init_get_bits(gb, avpkt->data, s->buf_bit_size);
|
||||
skip_bits(gb, s->packet_offset);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue