aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-27 15:10:26 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commitf66140a1bd21df919385ec1699326ae6dbca0458 (patch)
tree9879870d694f8d1a18e1db0089d785f2ae00b8ab
parentfa595a94a11836435d0fa34bc3add1029dd93542 (diff)
downloadffmpeg-f66140a1bd21df919385ec1699326ae6dbca0458.tar.gz
avcodec/svq3: Reject dx/dy beyond 16bit
The code does use 16bit sized arrays later so larger deltas would not work Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 48b3117844177d8442bc9fa3ede1d31ce82ae6fc) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/svq3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 00a2bef93b..0e0eda3a45 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -551,7 +551,7 @@ static inline int svq3_mc_dir(SVQ3Context *s, int size, int mode,
dy = 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");
return -1;
}