diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-02-27 21:44:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-03-08 00:47:21 +0100 |
commit | ec8ff659f57786c4cb089b07dfeab7e5cbab8d52 (patch) | |
tree | eff49bd662c26a65893b569719cc7282894e3700 | |
parent | 1c60ad469ee7da985d8f87d9018bc4ca33596df9 (diff) | |
download | ffmpeg-ec8ff659f57786c4cb089b07dfeab7e5cbab8d52.tar.gz |
avformat/avidec: Check height
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>
-rw-r--r-- | libavformat/avidec.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |