summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2000-05-12 06:06:26 +0000
committerderaadt <deraadt@openbsd.org>2000-05-12 06:06:26 +0000
commitdd599dd77c96bc764cdbb1fa50c8cf27897a5732 (patch)
tree7e0225e42ed41867d2ac36e40d6c12e6e1fb9f31
parentfix an oopsie; millert (diff)
downloadwireguard-openbsd-dd599dd77c96bc764cdbb1fa50c8cf27897a5732.tar.xz
wireguard-openbsd-dd599dd77c96bc764cdbb1fa50c8cf27897a5732.zip
nasty bug in %f; espie
-rw-r--r--usr.sbin/pkg_install/lib/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c
index 927a3ea4b79..c3288081af0 100644
--- a/usr.sbin/pkg_install/lib/file.c
+++ b/usr.sbin/pkg_install/lib/file.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: file.c,v 1.11 2000/04/28 22:13:55 espie Exp $ */
+/* $OpenBSD: file.c,v 1.12 2000/05/12 06:06:26 deraadt Exp $ */
#ifndef lint
-static const char *rcsid = "$OpenBSD: file.c,v 1.11 2000/04/28 22:13:55 espie Exp $";
+static const char *rcsid = "$OpenBSD: file.c,v 1.12 2000/05/12 06:06:26 deraadt Exp $";
#endif
/*
@@ -640,6 +640,7 @@ format_cmd(char *buf, size_t size, const char *fmt,
return 0;
pos = strrchr(name, '/');
if (pos != NULL) {
+ pos++;
len = strlen(name) - (pos-name);
if (len >= size)
return 0;