Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-02-27 23:44:29 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-03-29 00:18:56 +0300
commit432cbff7bbd0f480ab47b49b3ddb5a749fb84c53 (patch)
treeb651d7a883995737ddf9e0eb890c7d1bfc0555d6 /libavformat
parent32778e5a5e640d00b5f565107a230f56312423f3 (diff)
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 86f857b1e3..8584b4a882 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -862,6 +862,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);