diff options
author | jkh <jkh@FreeBSD.org> | 1996-12-09 08:22:19 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-12-09 08:22:19 +0000 |
commit | 78cf4aee6b346217e9f9fbee836c6c67a8cbda61 (patch) | |
tree | 703f1957c7cb4d3138f4dca933a94c51a76a6ae6 /usr.sbin/sysinstall/index.c | |
parent | 316f6be0fa40f1f38890e5f7030d808f4de39e18 (diff) | |
download | FreeBSD-src-78cf4aee6b346217e9f9fbee836c6c67a8cbda61.zip FreeBSD-src-78cf4aee6b346217e9f9fbee836c6c67a8cbda61.tar.gz |
As Paul has just pointed out, much of my strncpy() usage was either
bogus or overly complex and really needed to be done more consistently
and sanely throughout - no question about it. Done.
Suggested-By: Paul Traina <pst@Shockwave.COM>
Diffstat (limited to 'usr.sbin/sysinstall/index.c')
-rw-r--r-- | usr.sbin/sysinstall/index.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index 4c5d144..62bcc0e 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: index.c,v 1.37 1996/08/01 12:02:24 jkh Exp $ + * $Id: index.c,v 1.38 1996/08/03 10:10:54 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -491,7 +491,7 @@ index_menu(PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll) char buf[256]; /* Brutally adjust description to fit in menu */ - strcpy(buf, kp->desc); + SAFE_STRCPY(buf, kp->desc); if (strlen(buf) > (_MAX_DESC - maxname)) buf[_MAX_DESC - maxname] = '\0'; nitems = item_add(nitems, kp->name, buf, pkg_checked, pkg_fire, pkg_selected, kp, (int)plist, &curr, &max); @@ -555,7 +555,7 @@ index_extract_one(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended) if (id && id->deps && strlen(id->deps)) { char t[1024], *cp, *cp2; - strcpy(t, id->deps); + SAFE_STRCPY(t, id->deps); cp = t; while (cp && DITEM_STATUS(status) == DITEM_SUCCESS) { if ((cp2 = index(cp, ' ')) != NULL) |