Line 163 in tools.c, line 168 in tools.c, line 344 in keys.c, line 708 in keys.c, can have buffer overflows due to strcopy, instead please use strncopy which would allow for limiting the bytes sent to the buffer.
line 165 in tools.c, can have buffer overflows due to strcat, instead please use strncat which would allow for limiting the bytes sent to the buffer.
Line 323 in tools.c strcopies (strcopys??? dunno) Unsanitized input from a file, where it is used to manipulate a string. This may result in a buffer overflow vulnerability.