summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-22 20:09:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-22 20:09:37 +0000
commite907793543e3a921a9e675c12bde3541069418bc (patch)
tree7f092908ca12a77db437b1901daf8d1d0c4b8294 /sbin
parent0ab8a6a7ce8fdf2d0b3158bd2f4bb5d4d5660d3a (diff)
oops, backwards length check; moritz@jodeit.org
Diffstat (limited to 'sbin')
-rw-r--r--sbin/savecore/savecore.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 95d21d0fe66..89d009a2f9f 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: savecore.c,v 1.29 2002/05/22 08:21:02 deraadt Exp $ */
+/* $OpenBSD: savecore.c,v 1.30 2002/05/22 20:09:36 deraadt Exp $ */
/* $NetBSD: savecore.c,v 1.26 1996/03/18 21:16:05 leo Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)savecore.c 8.3 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: savecore.c,v 1.29 2002/05/22 08:21:02 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: savecore.c,v 1.30 2002/05/22 20:09:36 deraadt Exp $";
#endif
#endif /* not lint */
@@ -541,7 +541,7 @@ find_dev(dev, type)
(void)strlcpy(devname, _PATH_DEV, sizeof devname);
while ((dir = readdir(dfd))) {
(void)strlcpy(devname + sizeof(_PATH_DEV) - 1, dir->d_name,
- sizeof devname + sizeof(_PATH_DEV) - 1);
+ sizeof devname - (sizeof(_PATH_DEV) - 1));
if (lstat(devname, &sb)) {
syslog(LOG_ERR, "%s: %s", devname, strerror(errno));
continue;