summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorweingart <weingart@openbsd.org>2004-12-03 20:24:37 +0000
committerweingart <weingart@openbsd.org>2004-12-03 20:24:37 +0000
commit2c5243aa9a287dd78671350c55987f7c3895b162 (patch)
treeb86589385a860eb2127044e7ebc6e4f67ed4c5ba
parentIf the timestamp in the Entries file is larger than the file's (diff)
downloadwireguard-openbsd-2c5243aa9a287dd78671350c55987f7c3895b162.tar.xz
wireguard-openbsd-2c5243aa9a287dd78671350c55987f7c3895b162.zip
Handle files mode 750.
-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;
}