1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-20 13:06:36 +02:00

fix possible buffer overflows and undefined behaviour

This commit is contained in:
Jfreegman
2014-07-25 17:55:21 -04:00
parent fb5a9bc043
commit f630a3e604
6 changed files with 11 additions and 12 deletions

View File

@ -59,7 +59,7 @@ void init_logging_session(char *name, char *key, struct chatlog *log)
path_len += strlen(ident) + 1;
}
if (path_len > MAX_STR_SIZE) {
if (path_len >= MAX_STR_SIZE) {
log->log_on = false;
free(user_config_dir);
return;