mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/shorten: Check residual size
Fixes assertion failure Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1283c42447
commit
df8575584d
@ -661,6 +661,10 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
* of get_sr_golomb_shorten(). */
|
* of get_sr_golomb_shorten(). */
|
||||||
if (s->version == 0)
|
if (s->version == 0)
|
||||||
residual_size--;
|
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 */
|
/* calculate sample offset using means from previous blocks */
|
||||||
|
Loading…
Reference in New Issue
Block a user