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-06 20:27:35 +0200
commit061f8b941e954c3a6313b9084d020550ed609263 (patch)
tree85e590ebc476f30181994e776778728b2b219081 /libavformat
parent261557160ff360b4924729c142c45a7a1f86fc13 (diff)
downloadffmpeg-061f8b941e954c3a6313b9084d020550ed609263.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 4fdce640a1..02a4fd4c47 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -859,6 +859,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);