diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-06 19:53:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-06 19:53:25 +0200 |
commit | df8575584dcacde187d92ee3142800373fd34882 (patch) | |
tree | 6fe763bb6a9b23b1b78c3545e3b6ccd2437f71ac /libavcodec/shorten.c | |
parent | 1283c4244767bd19918f355c31d702a94ee0cc1b (diff) | |
download | ffmpeg-df8575584dcacde187d92ee3142800373fd34882.tar.gz |
avcodec/shorten: Check residual size
Fixes assertion failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/shorten.c')
-rw-r--r-- | libavcodec/shorten.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 2d3540a229..b785284aa2 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -661,6 +661,10 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data, * of get_sr_golomb_shorten(). */ if (s->version == 0) residual_size--; + if (residual_size > 30U) { + av_log(avctx, AV_LOG_ERROR, "residual size unsupportd: %d\n", residual_size); + return AVERROR_INVALIDDATA; + } } /* calculate sample offset using means from previous blocks */ |