diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 1996-08-08 07:58:07 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 1996-08-08 07:58:07 +0000 |
| commit | fef1477642f23853674d2f655e867a3f6b8c34b8 (patch) | |
| tree | ea6c8ed1743b76ac3452e08603829e452bbfdec8 /usr.bin/modstat/modstat.c | |
| parent | d670a62ab58e61681f466729be3e4ded5976b90c (diff) | |
Notes
Diffstat (limited to 'usr.bin/modstat/modstat.c')
| -rw-r--r-- | usr.bin/modstat/modstat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c index 956acf424bfc..7184223d4844 100644 --- a/usr.bin/modstat/modstat.c +++ b/usr.bin/modstat/modstat.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: modstat.c,v 1.2 1995/04/18 02:19:17 wpaul Exp $ + * $Id: modstat.c,v 1.3 1995/04/20 05:08:53 wpaul Exp $ */ #include <stdio.h> @@ -72,8 +72,9 @@ dostat(devfd, modnum, modname) { struct lmc_stat sbuf; + sbuf.name[MAXLKMNAME - 1] = '\0'; /* In case strncpy limits the string. */ if (modname != NULL) - strcpy(sbuf.name, modname); + strncpy(sbuf.name, modname, MAXLKMNAME - 1); sbuf.id = modnum; |
