--- muttlib.c.orig Thu Apr 22 14:43:58 2004 +++ muttlib.c Thu Apr 22 14:51:01 2004 @@ -657,7 +657,11 @@ void _mutt_mktemp (char *s, const char *src, int line) { - snprintf (s, _POSIX_PATH_MAX, "%s/mutt-%s-%d-%d", NONULL (Tempdir), NONULL(Hostname), (int) getpid (), Counter++); + char t[7]; + snprintf (t, 7, "-%05d", Counter++); + snprintf (s, _POSIX_PATH_MAX-6, "%s/mutt-%s-XXXXXXXX", NONULL(Tempdir), NONULL(Hostname)); + mktemp (s); + strncat(s, t, 6); dprint (1, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s)); unlink (s); }