From 4e2872808079e673c9af434dede9223793a6bd63 Mon Sep 17 00:00:00 2001 From: Chad Loder Date: Sun, 7 Dec 2008 21:12:53 +0000 Subject: time_t is signed, so use INT_MAX rather than UINT_MAX when parsing a time_t with strtonum --- libexec/spamd/grey.c | 4 ++-- usr.bin/ftp/cookie.c | 4 ++-- 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 * @@ -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; -- cgit v1.2.3