mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-22 09:15:06 +02:00
bmv: fix apparent sign error in the frame_off check
Fixes part of Ticket1373 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
679c578cb8
commit
debbcfae60
@ -143,7 +143,7 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
|
||||
switch (mode) {
|
||||
case 1:
|
||||
if (forward) {
|
||||
if (dst - frame + SCREEN_WIDE < frame_off ||
|
||||
if (dst - frame + SCREEN_WIDE < -frame_off ||
|
||||
frame_end - dst < frame_off + len)
|
||||
return -1;
|
||||
for (i = 0; i < len; i++)
|
||||
@ -151,7 +151,7 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
|
||||
dst += len;
|
||||
} else {
|
||||
dst -= len;
|
||||
if (dst - frame + SCREEN_WIDE < frame_off ||
|
||||
if (dst - frame + SCREEN_WIDE < -frame_off ||
|
||||
frame_end - dst < frame_off + len)
|
||||
return -1;
|
||||
for (i = len - 1; i >= 0; i--)
|
||||
|
Loading…
Reference in New Issue
Block a user