File libaom-CVE-2020-36129,36131,36135.patch of Package libaom.22091
diff --git a/apps/aomenc.c b/apps/aomenc.c
index 789cd60..f69ffd0 100644
--- a/apps/aomenc.c
+++ b/apps/aomenc.c
@@ -1715,6 +1715,7 @@
int profile_updated = 0;
memset(&input, 0, sizeof(input));
+ memset(&raw, 0, sizeof(raw));
exec_name = argv_[0];
/* Setup default input stream settings */
@@ -1989,14 +1990,10 @@
}
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);