summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2008-12-07 21:12:53 +0000
committerChad Loder <cloder@cvs.openbsd.org>2008-12-07 21:12:53 +0000
commit4e2872808079e673c9af434dede9223793a6bd63 (patch)
treec3de5846bccb25f00a01299e8d077748186df733
parent233f413a8d04b1866ed60d4d4ab0a70af9d654e7 (diff)
time_t is signed, so use INT_MAX rather than UINT_MAX when parsing a time_t
with strtonum
-rw-r--r--libexec/spamd/grey.c4
-rw-r--r--usr.bin/ftp/cookie.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index 65a532f8e31..58e4ad8c4ab 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.44 2008/08/26 22:49:09 jsg Exp $ */
+/* $OpenBSD: grey.c,v 1.45 2008/12/07 21:12:52 cloder Exp $ */
/*
* Copyright (c) 2004-2006 Bob Beck. All rights reserved.
@@ -697,7 +697,7 @@ twupdate(char *dbname, char *what, char *ip, char *source, char *expires)
now = time(NULL);
/* expiry times have to be in the future */
- expire = strtonum(expires, now, UINT_MAX, NULL);
+ expire = strtonum(expires, now, INT_MAX, NULL);
if (expire == 0)
return(-1);
diff --git a/usr.bin/ftp/cookie.c b/usr.bin/ftp/cookie.c
index 18fbb711b3d..9fde85a245d 100644
--- a/usr.bin/ftp/cookie.c
+++ b/usr.bin/ftp/cookie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cookie.c,v 1.3 2008/06/25 21:15:19 martynas Exp $ */
+/* $OpenBSD: cookie.c,v 1.4 2008/12/07 21:12:07 cloder Exp $ */
/*
* Copyright (c) 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
*
@@ -135,7 +135,7 @@ cookie_load(void)
* rely on sizeof(time_t) being 4
*/
ck->expires = strtonum(param, 0,
- UINT_MAX, &estr);
+ INT_MAX, &estr);
if (estr) {
if (errno == ERANGE)
ck->flags |= F_NOEXPIRY;