mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
avcodec/wmaprodec: Check for overread in decode_packet()
Fixes assertion failure Fixes: 0256e92df2df7e933b43a2c70e4c8040/signal_sigabrt_7ffff6ae7cc9_1358_999ac18684788221490757582ce9af84.wma Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0bd0af6e68
commit
7ad698e24e
@ -1694,6 +1694,11 @@ static int decode_packet(AVCodecContext *avctx, void *data,
|
||||
s->packet_done = 1;
|
||||
}
|
||||
|
||||
if (remaining_bits(s, gb) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Overread %d\n", -remaining_bits(s, gb));
|
||||
s->packet_loss = 1;
|
||||
}
|
||||
|
||||
if (s->packet_done && !s->packet_loss &&
|
||||
remaining_bits(s, gb) > 0) {
|
||||
/** save the rest of the data so that it can be decoded
|
||||
|
Loading…
Reference in New Issue
Block a user