From 0b66c702857b81fcacbf551c465e609f4222189be3ec6e52700db13bd2dbfcf0 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 2 Sep 2021 07:21:40 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Apache/apr?expand=0&rev=36 --- apr-CVE-2021-3594.patch | 44 +---------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/apr-CVE-2021-3594.patch b/apr-CVE-2021-3594.patch index a7d6c81..79577f4 100644 --- a/apr-CVE-2021-3594.patch +++ b/apr-CVE-2021-3594.patch @@ -1,23 +1,4 @@ ---- 1.7.x/random/unix/sha2.c 2021/07/02 11:07:15 1891197 -+++ 1.7.x/random/unix/sha2.c 2021/07/02 11:10:33 1891198 -@@ -425,7 +425,7 @@ - usedspace = freespace = 0; - } - --void apr__SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { -+void apr__SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context) { - sha2_word32 *d = (sha2_word32*)digest; - unsigned int usedspace; - -@@ -496,7 +496,7 @@ - usedspace = 0; - } - --char *apr__SHA256_End(SHA256_CTX* context, char buffer[]) { -+char *apr__SHA256_End(SHA256_CTX* context, char buffer[SHA256_DIGEST_STRING_LENGTH]) { - sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest; - int i; - + --- 1.7.x/time/unix/time.c 2021/07/02 11:07:15 1891197 +++ 1.7.x/time/unix/time.c 2021/07/02 11:10:33 1891198 @@ -142,6 +142,9 @@ @@ -30,27 +11,4 @@ /* shift new year to 1st March in order to make leap year calc easy */ if (xt->tm_mon < 2) ---- 1.7.x/time/win32/time.c 2021/07/02 11:07:15 1891197 -+++ 1.7.x/time/win32/time.c 2021/07/02 11:10:33 1891198 -@@ -54,6 +54,9 @@ static void SystemTimeToAprExpTime(apr_t - static const int dayoffset[12] = - {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; - -+ if (tm->wMonth < 1 || tm->wMonth > 12) -+ return APR_EBADDATE; -+ - /* Note; the caller is responsible for filling in detailed tm_usec, - * tm_gmtoff and tm_isdst data when applicable. - */ -@@ -228,6 +231,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_g - static const int dayoffset[12] = - {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275}; - -+ if (xt->tm_mon < 0 || xt->tm_mon >= 12) -+ return APR_EBADDATE; -+ - /* shift new year to 1st March in order to make leap year calc easy */ - - if (xt->tm_mon < 2) -