1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 03:36:45 +02:00

fix potential race conditions

This commit is contained in:
Jfreegman
2014-07-09 00:05:13 -04:00
parent f98c77432b
commit 1ce731471d
9 changed files with 31 additions and 27 deletions

View File

@ -253,7 +253,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int32_t num, uint8_t
/* holds the lone filename */
char filename_nopath[MAX_STR_SIZE];
get_file_name(filename_nopath, pathname);
get_file_name(filename_nopath, sizeof(filename_nopath), pathname);
int len = strlen(filename_nopath);
snprintf(msg, sizeof(msg), "File transfer request for '%s' (%llu bytes).", filename_nopath,