1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
From: Markus Koschany <apo@debian.org>
Date: Tue, 29 Aug 2023 22:19:18 +0200
Subject: CVE-2020-36131
This is also the fix for CVE-2020-36135.
apps/aomenc.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/apps/aomenc.c b/apps/aomenc.c
index db09102..044c5d9 100644
@@ -1878,6 +1878,7 @@ int main(int argc, const char **argv_) {
int profile_updated = 0;
memset(&input, 0, sizeof(input));
+ memset(&raw, 0, sizeof(raw));
exec_name = argv_[0];
/* Setup default input stream settings */
@@ -2108,14 +2109,10 @@ int main(int argc, const char **argv_) {
}
if (pass == (global.pass ? global.pass - 1 : 0)) {
- if (input.file_type == FILE_TYPE_Y4M)
- /*The Y4M reader does its own allocation.
- Just initialize this here to avoid problems if we never read any
- frames.*/
- memset(&raw, 0, sizeof(raw));
- else
+ // The Y4M reader does its own allocation.
+ if (input.file_type != FILE_TYPE_Y4M) {
aom_img_alloc(&raw, input.fmt, input.width, input.height, 32);
-
+ }
FOREACH_STREAM(stream, streams) {
stream->rate_hist =
init_rate_histogram(&stream->config.cfg, &global.framerate);
|