diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-02-27 21:44:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-04-09 22:19:40 +0200 |
commit | 362f55733bcceae34a7f100ae9fcda8ab8310e2f (patch) | |
tree | e06dd040a21aca52932074a41c9dbb563d62843f | |
parent | 7f094e829ed0bda085cf6daec5821276cdc957d4 (diff) | |
download | ffmpeg-362f55733bcceae34a7f100ae9fcda8ab8310e2f.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>
(cherry picked from commit ec8ff659f57786c4cb089b07dfeab7e5cbab8d52)
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 b27278dbcd..282f4635fb 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -843,6 +843,8 @@ FF_ENABLE_DEPRECATION_WARNINGS 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); |