summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kbdcontrol
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2004-08-09 04:27:58 +0000
committerjmg <jmg@FreeBSD.org>2004-08-09 04:27:58 +0000
commit3115c3a6e97b6e13b10759f3155d51cef3e0b6f3 (patch)
treec71767c8796a9143666fc34e2ecc9cbed42a1120 /usr.sbin/kbdcontrol
parent2b707fbd8fb9f2858a26eea1d2962ad18c405966 (diff)
downloadFreeBSD-src-3115c3a6e97b6e13b10759f3155d51cef3e0b6f3.zip
FreeBSD-src-3115c3a6e97b6e13b10759f3155d51cef3e0b6f3.tar.gz
fix bug which prevented programming function keys that were exactly 16
characters long.. strcpy was coping over the length... PR: 52960 Submitted by: Dmitry Sivachenko MFC after: 1 week
Diffstat (limited to 'usr.sbin/kbdcontrol')
-rw-r--r--usr.sbin/kbdcontrol/kbdcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c
index 0f2ad21..eb72b82 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -893,7 +893,7 @@ set_functionkey(char *keynumstr, char *string)
fkey.flen, MAXFK);
return;
}
- strcpy(fkey.keydef, string);
+ strncpy(fkey.keydef, string, MAXFK);
fkey.keynum -= 1;
if (ioctl(0, SETFKEY, &fkey) < 0)
warn("setting function key");
OpenPOWER on IntegriCloud