summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-09-07 22:19:45 +0000
committerjkh <jkh@FreeBSD.org>1995-09-07 22:19:45 +0000
commitb63f80398aaa10926795aa82696b3db47f789828 (patch)
tree7b6a57b2a033a8d8b6c304560b88f8e04049cf3f /sys
parent2539acf77b018acd7416a9857a14c466e55cd7e8 (diff)
downloadFreeBSD-src-b63f80398aaa10926795aa82696b3db47f789828.zip
FreeBSD-src-b63f80398aaa10926795aa82696b3db47f789828.tar.gz
Render devices inactive properly.
Protect against name overflow. Submitted by: Michael Smith <msmith@atrad.adelaide.edu.au>
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/userconfig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c
index 2f1d91f..ecdd174 100644
--- a/sys/i386/i386/userconfig.c
+++ b/sys/i386/i386/userconfig.c
@@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
- ** $Id$
+ ** $Id: userconfig.c,v 1.31 1995/09/06 03:36:36 jkh Exp $
**/
/**
@@ -1049,7 +1049,8 @@ drawline(int row, int detail, DEV_LIST *list, int inverse, char *dhelp)
{
char lbuf[90],nb[70],db[20],ib[16],pb[16];
- strcpy(nb,list->name);
+ strncpy(nb,list->name,58);
+ nb[58] = '\0';
if ((list->comment == DEV_ZOOMED) && (list->next))
if (list->next->comment == DEV_DEVICE) /* only mention if there's something hidden */
strcat(nb," (Collapsed)");
@@ -1804,7 +1805,7 @@ userconfig(void)
case KEY_DEL:
- dp = ofsent(actofs,active); /* get current device */
+ dp = ofsent(actofs,alist); /* get current device */
if (dp) /* paranoia... */
{
if (dp->attrib & FLG_MANDATORY) /* can't be deleted */
OpenPOWER on IntegriCloud