[FFmpeg-cvslog] avcodec/scpr3: add missing check for decode_value3() return value

James Almer git at videolan.org
Sat Apr 27 22:15:45 EEST 2019


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Apr 26 12:31:19 2019 -0300| [938cb783d40ad5ee40f4e2be8617fdfb493dbe4d] | committer: James Almer

avcodec/scpr3: add missing check for decode_value3() return value

Fixes ticket #7866.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=938cb783d40ad5ee40f4e2be8617fdfb493dbe4d
---

 libavcodec/scpr3.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/scpr3.c b/libavcodec/scpr3.c
index f92ccfa902..5cfad9f4d2 100644
--- a/libavcodec/scpr3.c
+++ b/libavcodec/scpr3.c
@@ -1038,6 +1038,9 @@ static int decompress_p3(AVCodecContext *avctx,
                          s->range_model3.freqs[1],
                          s->range_model3.cnts,
                          s->range_model3.dectab, &temp);
+    if (ret < 0)
+        return ret;
+
     min += temp << 8;
     ret |= decode_value3(s, 255, &s->range_model3.cntsum,
                          s->range_model3.freqs[0],



More information about the ffmpeg-cvslog mailing list