diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2006-03-07 16:48:54 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2006-03-07 16:48:54 +0000 |
commit | d51130fb2ee7f121511992d10659d35c81d61576 (patch) | |
tree | 52c4dd7b896679cf3494b17cd85ce7adf457180e | |
parent | 49816b170a190db027157c4116201ccdd3d19888 (diff) |
make sure the timezone is valid;
-rw-r--r-- | usr.bin/cvs/rcs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 0053988e477..c071c5eb9a4 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.135 2006/03/07 01:43:18 joris Exp $ */ +/* $OpenBSD: rcs.c,v 1.136 2006/03/07 16:48:53 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -2554,6 +2554,14 @@ rcs_expand_keywords(char *rcsfile, struct rcs_delta *rdp, char *data, tb = localtime(&now); tb->tm_hour += ((int)tb->tm_gmtoff / 3600); } else { + switch (*timezone_flag) { + case '-': + case '+': + break; + default: + fatal("not a known time zone"); + } + h = timezone_flag; if ((m = strrchr(timezone_flag, ':')) != NULL) *(m++) = '\0'; |