git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1283c42
)
avcodec/shorten: Check residual size
author
Michael Niedermayer
<michael@niedermayer.cc>
Sat, 6 May 2017 17:53:25 +0000
(19:53 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Sat, 6 May 2017 17:53:25 +0000
(19:53 +0200)
Fixes assertion failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/shorten.c
patch
|
blob
|
history
diff --git
a/libavcodec/shorten.c
b/libavcodec/shorten.c
index
2d3540a
..
b785284
100644
(file)
--- 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 */