Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libutil fix date -d 12/01/2022, found by Anon Ymous



details:   https://anonhg.NetBSD.org/src/rev/849fec042d9a
branches:  trunk
changeset: 365757:849fec042d9a
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 23 13:02:04 2022 +0000

description:
fix date -d 12/01/2022, found by Anon Ymous

diffstat:

 lib/libutil/parsedate.y |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 1fe2bb2c8e5c -r 849fec042d9a lib/libutil/parsedate.y
--- a/lib/libutil/parsedate.y   Sat Apr 23 11:44:01 2022 +0000
+++ b/lib/libutil/parsedate.y   Sat Apr 23 13:02:04 2022 +0000
@@ -14,7 +14,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __RCSID
-__RCSID("$NetBSD: parsedate.y,v 1.36 2020/10/30 22:03:11 kre Exp $");
+__RCSID("$NetBSD: parsedate.y,v 1.37 2022/04/23 13:02:04 christos Exp $");
 #endif
 
 #include <stdio.h>
@@ -359,7 +359,7 @@
                        param->yyMonth = $3;
                        param->yyDay = $5;
                } else {
-                       if ($1 >= 12 || $3 > 31 || $1 == 0 || $3 == 0)
+                       if ($1 > 12 || $3 > 31 || $1 == 0 || $3 == 0)
                                YYREJECT;
                        param->yyMonth = $1;
                        param->yyDay = $3;



Home | Main Index | Thread Index | Old Index