Skip to content

Commit 3a2957b

Browse files
author
Robin Müller
committed
Fixed buffer overflow in read_config
1 parent 68d6447 commit 3a2957b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/configuraion.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ configuration_t read_config(const char *filename) {
9090
uint8_t i, j;
9191
for (i = 0; i < MAX_FINGERS; i++) {
9292
for (j = 0; j < DIRECTIONS_COUNT; j++) {
93-
char ini_key[15];
93+
char ini_key[16];
9494
sprintf(ini_key, "%d-fingers:%s", INDEX_TO_FINGER(i), directions[j]);
9595
fill_keys_array(&result.swipe_keys[i][j].keys, iniparser_getstring(ini, ini_key, NULL));
9696
}

0 commit comments

Comments
 (0)