summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcsnum.c
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-02-25 20:32:49 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2005-02-25 20:32:49 +0000
commiteaf739340cc437965c78359443b2c66b50cc3f23 (patch)
treeb7a9dfc6ad7d6f1872869166103ebd5adca5e948 /usr.bin/cvs/rcsnum.c
parentcee89bd87c26afade5133b96abe198b2676da3e6 (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.c4
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);
}