diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2022-02-09 15:53:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2022-02-09 15:53:36 +0000 |
commit | 25de92fabe9b82b421019eb4b1477bbebfb05ff4 (patch) | |
tree | e50e84d224fc38b214515d69cff452269ffdd238 /usr.bin/getcap | |
parent | 53cdb87bf79982196c5d5fccb01b72915f842b5e (diff) |
Fix the -f option when passed multiple files.
Found by robert@
Diffstat (limited to 'usr.bin/getcap')
-rw-r--r-- | usr.bin/getcap/getcap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/getcap/getcap.c b/usr.bin/getcap/getcap.c index 66d43d5ac7d..9ea99fcafee 100644 --- a/usr.bin/getcap/getcap.c +++ b/usr.bin/getcap/getcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getcap.c,v 1.8 2019/01/25 00:19:26 millert Exp $ */ +/* $OpenBSD: getcap.c,v 1.9 2022/02/09 15:53:35 millert Exp $ */ /* * Copyright (c) 2005 Todd C. Miller <millert@openbsd.org> @@ -77,7 +77,7 @@ main(int argc, char *argv[]) if (pathvec != NULL) errx(1, "only one -f option may be specified"); for (n = 1, cp = optarg; (cp = strchr(cp, ':')); n++) - continue; + cp++; pathvec = calloc(n + 1, sizeof(char *)); for (n = 0; (pathvec[n] = strsep(&optarg, ":"));) { if (*pathvec[n] != '\0') |