summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovos <provos@openbsd.org>1997-11-18 23:23:18 +0000
committerprovos <provos@openbsd.org>1997-11-18 23:23:18 +0000
commita15d8dce36cd1c79b8b78e8546d9164ada4f31ad (patch)
treed15cca599c440f3010bb680a5212f09b83d04b33
parentreadlink does not necessarily NUL-terminate (diff)
downloadwireguard-openbsd-a15d8dce36cd1c79b8b78e8546d9164ada4f31ad.tar.xz
wireguard-openbsd-a15d8dce36cd1c79b8b78e8546d9164ada4f31ad.zip
check correct size of buffer. from felix@mamba.pond.sub.org. pr #350
-rw-r--r--usr.bin/modstat/modstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c
index 0a69672ade1..e4193613fb4 100644
--- a/usr.bin/modstat/modstat.c
+++ b/usr.bin/modstat/modstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: modstat.c,v 1.9 1997/09/11 11:03:14 deraadt Exp $ */
+/* $OpenBSD: modstat.c,v 1.10 1997/11/18 23:23:18 provos Exp $ */
/*
* Copyright (c) 1993 Terrence R. Lambert.
@@ -80,7 +80,7 @@ dostat(devfd, modnum, modname)
sbuf.name = name;
if (modname != NULL) {
- if (strlen(modname) >= sizeof(sbuf.name))
+ if (strlen(modname) >= sizeof(name))
return 4;
strcpy(sbuf.name, modname);
}