summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>2004-12-03 20:24:38 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>2004-12-03 20:24:38 +0000
commit29e82535dd0d9a0d0ec98f71fab4a09869ef2fb6 (patch)
tree64e58a1afcbe14c18536c0c0628913f2a1773a99 /usr.bin
parent6d313b915041608634bfab48d752352dca664429 (diff)
Handle files mode 750.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c
index e9b7b975559..3461796b5fa 100644
--- a/usr.bin/cvs/util.c
+++ b/usr.bin/cvs/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.13 2004/11/26 16:23:50 jfb Exp $ */
+/* $OpenBSD: util.c,v 1.14 2004/12/03 20:24:37 weingart Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -229,7 +229,9 @@ cvs_strtomode(const char *str, mode_t *mode)
if (ep != NULL)
*ep = '\0';
- if (sscanf(sp, "%c=%3s", &type, ms) != 2) {
+ memset(ms, 0, sizeof ms);
+ if (sscanf(sp, "%c=%3s", &type, ms) != 2 &&
+ sscanf(sp, "%c=", &type) != 1) {
cvs_log(LP_WARN, "failed to scan mode string `%s'", sp);
continue;
}