diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-02-27 21:44:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-03-28 22:51:59 +0200 |
commit | 34f075f3ff6ff194662dba00645e0deb2f4005b8 (patch) | |
tree | c3ccfddaeb2146f641f104fe3bc0c5b6e7f5c9e2 /libavformat/avidec.c | |
parent | 2063db041e5c756dff4dbcafdd8c63f9caf30cb9 (diff) | |
download | ffmpeg-34f075f3ff6ff194662dba00645e0deb2f4005b8.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>
Diffstat (limited to 'libavformat/avidec.c')
-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 20ce107f34..b8dd3bafab 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -841,6 +841,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); |