Archived
2
0

security fix: only 2 chars for setxkbmap

This commit is contained in:
Miroslav Šedivý 2020-06-16 00:23:00 +02:00
parent 4a7800c93f
commit 56bd6acf10

View File

@ -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);
} }