From: jsg Date: Tue, 29 Apr 2014 07:44:19 +0000 (+0000) Subject: fix a test for invalid timezones X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=80b3ff6b0c88098739ea140c1d9bdda2f28b132d;p=openbsd fix a test for invalid timezones oks from a bunch of people --- diff --git a/usr.bin/rcs/rcstime.c b/usr.bin/rcs/rcstime.c index c2372afbef7..d1a72b5893e 100644 --- a/usr.bin/rcs/rcstime.c +++ b/usr.bin/rcs/rcstime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcstime.c,v 1.3 2007/02/27 07:59:13 xsa Exp $ */ +/* $OpenBSD: rcstime.c,v 1.4 2014/04/29 07:44:19 jsg Exp $ */ /* * Copyright (c) 2006 Joris Vink * All rights reserved. @@ -63,7 +63,7 @@ rcs_set_tz(char *tz, struct rcs_delta *rdp, struct tm *tb) memcpy(tb, &rdp->rd_date, sizeof(*tb)); tzone = atoi(h); - if ((tzone >= 24) && (tzone <= -24)) + if ((tzone >= 24) || (tzone <= -24)) errx(1, "%s: not a known time zone", tz); if (pos) {