mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
security fix: only 2 chars for setxkbmap
This commit is contained in:
parent
4a7800c93f
commit
56bd6acf10
@ -168,7 +168,7 @@ short XGetScreenRate() {
|
||||
|
||||
void SetKeyboard(char *layout) {
|
||||
// TOOD: refactor, use native API.
|
||||
char cmd[12] = "setxkbmap ";
|
||||
strcat(cmd, layout);
|
||||
char cmd[13] = "setxkbmap ";
|
||||
strncat(cmd, layout, 2);
|
||||
system(cmd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user