diff options
author | Michael Niedermayer <[email protected]> | 2018-03-11 00:13:57 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2018-04-13 00:35:15 +0200 |
commit | 02bf1c617cdd34a80a290963c23f92a7e01630dc (patch) | |
tree | 4f6b084587d2909e904e6d7116f3b392e43be98a | |
parent | edfe9ae63b191ea435f23628904094fdba3f1364 (diff) |
avcodec/wmalosslessdec: Reset num_saved_bits on error path
Fixes: NULL pointer dereference
Fixes: poc-201803.wav
Found-by: GwanYeong Kim <[email protected]>
Reviewed-by: Paul B Mahol <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 64c9ce0abc0fd8774b523afda3ddb17c86caa86a)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavcodec/wmalosslessdec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 133a3e92d1..59e8929586 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -1148,6 +1148,7 @@ static void save_bits(WmallDecodeCtx *s, GetBitContext* gb, int len, if (len <= 0 || buflen > s->max_frame_size) { avpriv_request_sample(s->avctx, "Too small input buffer"); s->packet_loss = 1; + s->num_saved_bits = 0; return; } |