aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-02-27 21:44:29 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-13 23:39:50 +0200
commitb545c250783bcc82f07372a6808d9745615d9b1a (patch)
tree6438a790d03aaf0a019192c9745fa878f21fa6bc /libavformat
parent680f821af320cb5955f0acbfea43d9a1350bccea (diff)
downloadffmpeg-b545c250783bcc82f07372a6808d9745615d9b1a.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')
-rw-r--r--libavformat/avidec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 0cb97dec3d..b9b0e6bb6c 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);