Fixes out-of-bounds writes. Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> --- libavcodec/speedhq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c index 385f779f83..6ae1e0f8df 100644 --- a/libavcodec/speedhq.c +++ b/libavcodec/speedhq.c @@ -198,7 +198,7 @@ static inline int decode_alpha_block(const SHQContext *s, GetBitContext *gb, uin if (run == 128) break; i += run; - if (i >= 128) + if (i < 0 || i >= 128) return AVERROR_INVALIDDATA; UPDATE_CACHE_LE(re, gb); -- 2.11.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel