mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
avcodec/scpr: improve check for out of range motion vectors
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
95a5af446b
commit
45ed942e7e
1 changed files with 2 additions and 1 deletions
|
|
@ -504,7 +504,8 @@ static int decompress_p(AVCodecContext *avctx,
|
|||
mvx -= 256;
|
||||
mvy -= 256;
|
||||
|
||||
if (by + mvy + sy1 < 0 || bx + mvx + sx1 < 0)
|
||||
if (by + mvy + sy1 < 0 || bx + mvx + sx1 < 0 ||
|
||||
by + mvy + sy1 >= avctx->height || bx + mvx + sx1 >= avctx->width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
for (i = 0; i < sy2 - sy1 && (by + sy1 + i) < avctx->height; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue