From: cristy Date: Sun, 30 Mar 2014 22:36:34 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2526 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21dcdb047219cb881b8083ee3ab14a5e95bd86c2;p=imagemagick --- diff --git a/MagickCore/random.c b/MagickCore/random.c index f41dae7e2..07e1846c5 100644 --- a/MagickCore/random.c +++ b/MagickCore/random.c @@ -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)