diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-30 19:00:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-30 22:13:38 +0200 |
commit | e976e68fc5513fea05b45556cbe959e6675dbe7d (patch) | |
tree | b3f3b105fafd626f3b8b2785c0bac1f55fc6993c /libavcodec/atrac3.c | |
parent | 2104e3383fd1e9340c693451d9c7abb6501683ac (diff) | |
download | ffmpeg-e976e68fc5513fea05b45556cbe959e6675dbe7d.tar.gz |
avcodec/atrac3: Check init_get_bits8() for failure
This is more for correctness than actually fixing a missing error path
Fixes CID1399967
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/atrac3.c')
-rw-r--r-- | libavcodec/atrac3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 88ee9babcc..6cdcdf1964 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -693,8 +693,10 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *databuf, /* set the bitstream reader at the start of the second Sound Unit */ - init_get_bits8(&q->gb, + ret = init_get_bits8(&q->gb, ptr1, q->decoded_bytes_buffer + js_block_align - ptr1); + if (ret < 0) + return ret; /* Fill the Weighting coeffs delay buffer */ memmove(q->weighting_delay[js_pair], &q->weighting_delay[js_pair][2], |