1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

avcodec/wmalosslessdec: Reset num_saved_bits on error path

Fixes: NULL pointer dereference
Fixes: poc-201803.wav
Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 64c9ce0abc0fd8774b523afda3ddb17c86caa86a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2018-03-11 00:13:57 +01:00
parent 5770793dec
commit 1c0914e4f3

View File

@ -1129,6 +1129,7 @@ static void save_bits(WmallDecodeCtx *s, GetBitContext* gb, int len,
if (len <= 0 || buflen > MAX_FRAMESIZE) { if (len <= 0 || buflen > MAX_FRAMESIZE) {
avpriv_request_sample(s->avctx, "Too small input buffer"); avpriv_request_sample(s->avctx, "Too small input buffer");
s->packet_loss = 1; s->packet_loss = 1;
s->num_saved_bits = 0;
return; return;
} }