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

Fix potential string truncations with snprintf

This commit is contained in:
jfreegman
2017-09-01 17:36:17 -04:00
parent 52dd60dc86
commit f2c116feb3
3 changed files with 4 additions and 4 deletions

View File

@ -561,7 +561,7 @@ static void chat_onFileRecv(ToxWindow *self, Tox *m, uint32_t friendnum, uint32_
bytes_convert_str(sizestr, sizeof(sizestr), file_size);
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "File transfer request for '%s' (%s)", filename, sizestr);
char file_path[MAX_STR_SIZE];
char file_path[PATH_MAX + name_length + 1];
size_t path_len = name_length;
/* use specified download path in config if possible */