Commit 0c42d0ad authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/bmp: Fix runtime error: negation of -2147483648 cannot be represented...

avcodec/bmp: Fix runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself

There is code checking height and width later, leaving an invalid value invalid
is thus fine.

Fixes: 635/clusterfuzz-testcase-6225161437052928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 4ec07e94
......@@ -133,7 +133,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
}
avctx->width = width;
avctx->height = height > 0 ? height : -height;
avctx->height = height > 0 ? height : -(unsigned)height;
avctx->pix_fmt = AV_PIX_FMT_NONE;
......
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