Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/time Reject timezone offsets more than 12 hours (ea...
details: https://anonhg.NetBSD.org/src/rev/c1167f5fc65d
branches: trunk
changeset: 341296:c1167f5fc65d
user: ginsbach <ginsbach%NetBSD.org@localhost>
date: Fri Oct 30 01:49:36 2015 +0000
description:
Reject timezone offsets more than 12 hours (east or west).
diffstat:
lib/libc/time/strptime.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r a7fc3ff3d26b -r c1167f5fc65d lib/libc/time/strptime.c
--- a/lib/libc/time/strptime.c Thu Oct 29 22:42:55 2015 +0000
+++ b/lib/libc/time/strptime.c Fri Oct 30 01:49:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strptime.c,v 1.51 2015/10/29 19:18:19 christos Exp $ */
+/* $NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $ */
/*-
* Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strptime.c,v 1.51 2015/10/29 19:18:19 christos Exp $");
+__RCSID("$NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $");
#endif
#include "namespace.h"
@@ -626,6 +626,8 @@
default:
return NULL;
}
+ if (offs > (12 * SECSPERHOUR))
+ return NULL;
if (neg)
offs = -offs;
tm->tm_isdst = 0; /* XXX */
Home |
Main Index |
Thread Index |
Old Index