svn commit: r339359 - stable/11/lib/libc/stdtime

Konstantin Belousov kib at FreeBSD.org
Mon Oct 15 10:50:05 UTC 2018


Author: kib
Date: Mon Oct 15 10:50:04 2018
New Revision: 339359
URL: https://svnweb.freebsd.org/changeset/base/339359

Log:
  MFC r339241:
  Disallow zero day of month from strptime("%d").
  
  PR:	232072

Modified:
  stable/11/lib/libc/stdtime/strptime.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/stdtime/strptime.c
==============================================================================
--- stable/11/lib/libc/stdtime/strptime.c	Mon Oct 15 10:29:29 2018	(r339358)
+++ stable/11/lib/libc/stdtime/strptime.c	Mon Oct 15 10:50:04 2018	(r339359)
@@ -417,7 +417,7 @@ label:
 				i += *buf - '0';
 				len--;
 			}
-			if (i > 31)
+			if (i == 0 || i > 31)
 				return (NULL);
 
 			tm->tm_mday = i;


More information about the svn-src-all mailing list