diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1997-11-18 23:23:19 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1997-11-18 23:23:19 +0000 |
commit | e54ff31113319a8f2be0a36965560b51a01e64c0 (patch) | |
tree | 5bf3be3be2bcf76b1b2bbbd96d84252077d1911f | |
parent | 7caf9e958bb591aec1b20981f5a7043f31cdbd28 (diff) |
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); } |