From f7883b5af8dea8cb5e059fe618fec22a82ecc237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20J=2EV=2E=20Bertin?= Date: Mon, 26 Sep 2016 11:32:03 +0200 Subject: [PATCH] 6 random bits in the temp filename really should be enough (= 62^6 combinations) Committed from host : Bola --- afsctool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/afsctool.c b/afsctool.c index 2efa195..2b68dff 100644 --- a/afsctool.c +++ b/afsctool.c @@ -249,9 +249,9 @@ void compressFile(const char *inFile, struct stat *inFileInfo, struct folder_inf // add the processor ID for the unlikely case that 2 threads try to backup a file with the same name // at the same time, and mkstemps() somehow generates the same temp. name. I've seen it generate EEXIST // errors which suggest that might indeed happen. - bkNameLen = asprintf(&backupName, "/tmp/afsctbk.%d.XXXXXXXXXX.%s", currentParallelProcesorID(worker), inname); + bkNameLen = asprintf(&backupName, "/tmp/afsctbk.%d.XXXXXX.%s", currentParallelProcesorID(worker), inname); #else - bkNameLen = asprintf(&backupName, "/tmp/afsctbk.XXXXXXXXXX.%s", inname); + bkNameLen = asprintf(&backupName, "/tmp/afsctbk.XXXXXX.%s", inname); #endif } if (!infile || bkNameLen < 0)