diff options
Diffstat (limited to 'sbin/fdisk/misc.c')
-rw-r--r-- | sbin/fdisk/misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fdisk/misc.c b/sbin/fdisk/misc.c index 997b271c177..e511cf36a8c 100644 --- a/sbin/fdisk/misc.c +++ b/sbin/fdisk/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.8 2002/01/18 08:38:26 kjell Exp $ */ +/* $OpenBSD: misc.c,v 1.9 2002/01/23 22:04:01 mickey Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -76,9 +76,9 @@ ask_cmd(cmd) buf = &buf[strspn(buf, " \t")]; cp = &buf[strcspn(buf, " \t")]; *cp++ = '\0'; - strncpy(cmd->cmd, buf, 10); + strncpy(cmd->cmd, buf, sizeof(cmd->cmd)); buf = &cp[strspn(cp, " \t")]; - strncpy(cmd->args, buf, 100); + strncpy(cmd->args, buf, sizeof(cmd->args)); return (0); } |