More better fix.

Suggested by:	Takahiro Kambe <taca@SKY.YAMASHINA.KYOTO.JP>
This commit is contained in:
Jun Kuriyama 2000-05-11 01:01:17 +00:00
parent df18cd688b
commit 46816bbf1b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=28399

View File

@ -1,11 +1,12 @@
--- src/mouse.c~ Mon Jan 27 20:40:27 1997
+++ src/mouse.c Mon May 8 15:39:35 2000
@@ -176,7 +176,7 @@
--- src/mouse.c.orig Mon Jan 27 20:40:27 1997
+++ src/mouse.c Tue May 9 18:08:44 2000
@@ -176,7 +176,8 @@
mouseType = MOUSE_NONE;
mInfo.has_mouse = FALSE;
- sscanf(config, "%s", name);
+ strncpy(name, config, MAX_COLS);
+ strncpy(name, config, MAX_COLS - 1);
+ name[MAX_COLS - 1] = '\0';
for (p = mice; p->name != NULL; p++) {
if (strcasecmp(name, p->name) == 0) {
mouseType = p->type;