aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-04-26 12:31:19 -0300
committerJames Almer <jamrial@gmail.com>2019-04-27 16:15:00 -0300
commit938cb783d40ad5ee40f4e2be8617fdfb493dbe4d (patch)
tree0bea235253fb977c283f08be0943269c28f3182e /libavcodec
parent163bb087f81d1cda9c29b83d9f14a376a6996f81 (diff)
downloadffmpeg-938cb783d40ad5ee40f4e2be8617fdfb493dbe4d.tar.gz
avcodec/scpr3: add missing check for decode_value3() return value
Fixes ticket #7866. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/scpr3.c3
1 files changed, 3 insertions, 0 deletions
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],