aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-12-23 09:41:06 +0100
committerPaul B Mahol <onemda@gmail.com>2016-12-23 09:41:06 +0100
commit51ed1a7dd40aab921047c620a7a77c6a72863c91 (patch)
tree5381a49b6a7a5294de31c484e5fe2ebd316f73de
parent41de965e31ef68baee1833da7fe3407fb192668b (diff)
downloadffmpeg-51ed1a7dd40aab921047c620a7a77c6a72863c91.tar.gz
avcodec/pixlet: check out of bounds pfx value
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/pixlet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index c1bd32187b..359c4f3f6e 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -267,6 +267,8 @@ static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst, i
escape = av_mod_uintp2(16383, pfx);
cnt1 = get_unary(b, 0, 8);
if (cnt1 < 8) {
+ if (pfx < 1 || pfx > 25)
+ return AVERROR_INVALIDDATA;
value = show_bits(b, pfx);
if (value > 1) {
skip_bits(b, pfx);