avcodec/targa: Skip hflip on blank images

Fixes: timeout with 810/clusterfuzz-testcase-5249282825256960

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-03-13 00:18:04 +01:00
parent 1467143a6e
commit acdacb108d
1 changed files with 21 additions and 20 deletions

View File

@ -265,7 +265,6 @@ static int decode_frame(AVCodecContext *avctx,
line = advance_line(dst, line, stride, &y, h, interleave);
} while (line);
}
}
if (flags & TGA_RIGHTTOLEFT) { // right-to-left, needs horizontal flip
int x;
@ -290,6 +289,8 @@ static int decode_frame(AVCodecContext *avctx,
}
}
}
}
*got_frame = 1;