Date: Mon, 15 Oct 2018 10:50:05 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339359 - stable/11/lib/libc/stdtime Message-ID: <201810151050.w9FAo5ST078469@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810151050.w9FAo5ST078469>