Commit 2cfd2307 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/svq3: Reject dx/dy beyond 16bit

The code does use 16bit sized arrays later so larger deltas would not work
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 48b31178)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 44fd5633
...@@ -538,7 +538,7 @@ static inline int svq3_mc_dir(SVQ3Context *s, int size, int mode, ...@@ -538,7 +538,7 @@ static inline int svq3_mc_dir(SVQ3Context *s, int size, int mode,
dy = get_interleaved_se_golomb(&s->gb_slice); dy = get_interleaved_se_golomb(&s->gb_slice);
dx = get_interleaved_se_golomb(&s->gb_slice); dx = get_interleaved_se_golomb(&s->gb_slice);
if (dx == INVALID_VLC || dy == INVALID_VLC) { if (dx != (int16_t)dx || dy != (int16_t)dy) {
av_log(s->avctx, AV_LOG_ERROR, "invalid MV vlc\n"); av_log(s->avctx, AV_LOG_ERROR, "invalid MV vlc\n");
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment