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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user