1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 00:26:34 +01: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

@@ -193,7 +193,7 @@ void cmd_sendfile(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv
fseek(file_to_send, 0, SEEK_SET);
char filename[MAX_STR_SIZE];
get_file_name(filename, path);
get_file_name(filename, sizeof(filename), path);
int filenum = tox_new_file_sender(m, self->num, filesize, (const uint8_t *) filename, strlen(filename));
if (filenum == -1) {