diff options
author | jmg <jmg@FreeBSD.org> | 2004-08-09 04:27:58 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2004-08-09 04:27:58 +0000 |
commit | 3115c3a6e97b6e13b10759f3155d51cef3e0b6f3 (patch) | |
tree | c71767c8796a9143666fc34e2ecc9cbed42a1120 | |
parent | 2b707fbd8fb9f2858a26eea1d2962ad18c405966 (diff) | |
download | FreeBSD-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
-rw-r--r-- | usr.sbin/kbdcontrol/kbdcontrol.c | 2 |
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"); |