diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-02-25 20:32:49 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-02-25 20:32:49 +0000 |
commit | eaf739340cc437965c78359443b2c66b50cc3f23 (patch) | |
tree | b7a9dfc6ad7d6f1872869166103ebd5adca5e948 /usr.bin/cvs/rcsnum.c | |
parent | cee89bd87c26afade5133b96abe198b2676da3e6 (diff) |
- switch to rcsnum_parse() where appropriate
- make rcsnum_parse() fail if it encounters an invalid character
Diffstat (limited to 'usr.bin/cvs/rcsnum.c')
-rw-r--r-- | usr.bin/cvs/rcsnum.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcsnum.c b/usr.bin/cvs/rcsnum.c index ac7462f2be2..ccbb696ad88 100644 --- a/usr.bin/cvs/rcsnum.c +++ b/usr.bin/cvs/rcsnum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.7 2005/02/25 20:05:42 jfb Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.8 2005/02/25 20:32:48 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -72,7 +72,7 @@ rcsnum_parse(const char *str) if ((num = rcsnum_alloc()) == NULL) return (NULL); - if (rcsnum_aton(str, &ep, num) < 0) { + if ((rcsnum_aton(str, &ep, num) < 0) || (*ep != '\0')) { rcsnum_free(num); return (NULL); } |