From: Kevin McCarthy Date: Fri, 4 Jan 2019 19:20:05 +0000 (-0800) Subject: Fix mkdtemp.c implementation. X-Git-Tag: mutt-1-11-2-rel~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=853e48bfca397d7f92eb88f63c5fd481e0196387;p=mutt Fix mkdtemp.c implementation. Two statements were indented on the same line under a for statement. The second one would not be included in the loop, only being executed after the loop finishes. This is obviously an error, as it modifies the LETTERS entry being used. --- diff --git a/mkdtemp.c b/mkdtemp.c index ae9d5d9e..55d907f0 100644 --- a/mkdtemp.c +++ b/mkdtemp.c @@ -28,7 +28,10 @@ char *mkdtemp (char *tmpl) { /* fill in the random bits */ for (j = 0, v = value; j < 6; ++j) - tmpl[(len - 6) + j] = LETTERS[v % 62]; v /= 62; + { + tmpl[(len - 6) + j] = LETTERS[v % 62]; + v /= 62; + } /* try to create the directory */ if (mkdir (tmpl, 0700) == 0)