You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mt...@apache.org on 2021/11/21 17:13:52 UTC
svn commit: r1895239 - /apr/apr/trunk/time/win32/time.c
Author: mturk
Date: Sun Nov 21 17:13:52 2021
New Revision: 1895239
URL: http://svn.apache.org/viewvc?rev=1895239&view=rev
Log:
Add missing bits from CVE-2021-35940 applied to 1.7.x branch
Modified:
apr/apr/trunk/time/win32/time.c
Modified: apr/apr/trunk/time/win32/time.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/time/win32/time.c?rev=1895239&r1=1895238&r2=1895239&view=diff
==============================================================================
--- apr/apr/trunk/time/win32/time.c (original)
+++ apr/apr/trunk/time/win32/time.c Sun Nov 21 17:13:52 2021
@@ -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;
+
/* Note; the caller is responsible for filling in detailed tm_usec,
* tm_gmtoff and tm_isdst data when applicable.
*/