diff --git a/client/src/fileutils.c b/client/src/fileutils.c index 62930d138..f266da9b2 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -190,12 +190,11 @@ char *newfilenamemcopyEx(const char *preferredName, const char *suffix, savePath return NULL; } - // 1: null terminator // 16: room for filenum to ensure new filename // save_path_len + strlen(PATHSEP): the user preference save paths //const size_t len = p_namelen + strlen(suffix) + 1 + 16 + save_path_len + strlen(PATHSEP); - const size_t len = FILE_PATH_SIZE * 2; + const size_t len = FILE_PATH_SIZE; char *fileName = (char *) calloc(len, sizeof(uint8_t)); if (fileName == NULL) {