Merge pull request #2701 from colinleroy/fix-tmp-files-again-again

Make sure pid and counter don't interfere
This commit is contained in:
Bob Andrews
2025-06-14 18:48:39 +02:00
committed by GitHub

View File

@@ -169,7 +169,7 @@ char* MakeTmpFilename (const char *Directory, const char *Origin, const char* Ex
Len += strlen (Origin) + (strlen (".2147483648") * 2) + strlen (Ext) + 1;
Out = xmalloc (Len);
snprintf (Out, Len, "%s%s.%u%u%s", (Directory != NULL ? Directory : ""),
snprintf (Out, Len, "%s%s.%u.%u%s", (Directory != NULL ? Directory : ""),
FindName(Origin), getpid(), Counter, Ext);
Counter++;