]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 30 Mar 2014 22:36:34 +0000 (22:36 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 30 Mar 2014 22:36:34 +0000 (22:36 +0000)
MagickCore/random.c

index f41dae7e2cc54d61a5c55a3fc91650f131b70fad..07e1846c551e45e24be2e6087ddff9f4a47b8fa0 100644 (file)
@@ -450,23 +450,22 @@ static StringInfo *GenerateEntropicChaos(RandomInfo *random_info)
 #if defined(MAGICKCORE_HAVE_MKSTEMP)
   {
     char
-      *filename;
+      path[MaxTextExtent];
 
     int
       file;
 
-    filename=ConstantString("magickXXXXXX");
-    file=mkstemp(filename);
+    (void) GetPathTemplate(path);
+    file=mkstemp(path);
 #if defined(__OS2__)
     setmode(file,O_BINARY);
 #endif
     if (file != -1)
       (void) close(file);
-    (void) remove_utf8(filename);
-    SetStringInfoLength(chaos,strlen(filename));
-    SetStringInfoDatum(chaos,(unsigned char *) filename);
+    (void) remove_utf8(path);
+    SetStringInfoLength(chaos,strlen(path));
+    SetStringInfoDatum(chaos,(unsigned char *) path);
     ConcatenateStringInfo(entropy,chaos);
-    filename=DestroyString(filename);
   }
 #endif
 #if defined(MAGICKCORE_WINDOWS_SUPPORT)