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) {
|
void SetKeyboard(char *layout) {
|
||||||
// TOOD: refactor, use native API.
|
// TOOD: refactor, use native API.
|
||||||
char cmd[12] = "setxkbmap ";
|
char cmd[13] = "setxkbmap ";
|
||||||
strcat(cmd, layout);
|
strncat(cmd, layout, 2);
|
||||||
system(cmd);
|
system(cmd);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user