diff options
author | 1997-11-18 23:23:18 +0000 | |
---|---|---|
committer | 1997-11-18 23:23:18 +0000 | |
commit | a15d8dce36cd1c79b8b78e8546d9164ada4f31ad (patch) | |
tree | d15cca599c440f3010bb680a5212f09b83d04b33 | |
parent | readlink does not necessarily NUL-terminate (diff) | |
download | wireguard-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.c | 4 |
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); } |