Message ID | 20220228000052.4071-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | ec8ff659f57786c4cb089b07dfeab7e5cbab8d52 |
Headers | show |
Series | [FFmpeg-devel] avformat/avidec: Check height | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_aarch64_jetson | success | Make finished |
andriy/make_fate_aarch64_jetson | success | Make fate finished |
andriy/make_armv7_RPi4 | success | Make finished |
andriy/make_fate_armv7_RPi4 | success | Make fate finished |
On Mon, Feb 28, 2022 at 01:00:52AM +0100, Michael Niedermayer wrote: > Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself > Fixes: Ticket8486 > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/avidec.c | 2 ++ > 1 file changed, 2 insertions(+) will apply [...]
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 0f0e6846da..455dce0733 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -862,6 +862,8 @@ static int avi_read_header(AVFormatContext *s) memcpy(st->codecpar->extradata + st->codecpar->extradata_size - 9, "BottomUp", 9); } + if (st->codecpar->height == INT_MIN) + return AVERROR_INVALIDDATA; st->codecpar->height = FFABS(st->codecpar->height); // avio_skip(pb, size - 5 * 4);
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: Ticket8486 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/avidec.c | 2 ++ 1 file changed, 2 insertions(+)