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:38:06 +0200
commit0225b8947b8f0c06441e6e82437968a5e4e7378e (patch)
tree4ac04235fa5a2c5bacc4e6eee7ef000968144efe /libavformat
parent7251a22f97f223ac16b9bd1567b9544d1910e63b (diff)
downloadffmpeg-0225b8947b8f0c06441e6e82437968a5e4e7378e.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 21b234b2de..e7e8126590 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -844,6 +844,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);