From: dirk Date: Sun, 26 Jun 2016 08:53:35 +0000 (+0200) Subject: Fixed locking inside NTGhostscriptExe. X-Git-Tag: 7.0.2-2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17f3510b0c1601689fab03bba4eb093e9064d9ef;p=imagemagick Fixed locking inside NTGhostscriptExe. --- diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c index b3bebfe59..8ab1116c7 100644 --- a/MagickCore/nt-base.c +++ b/MagickCore/nt-base.c @@ -1380,15 +1380,16 @@ MagickPrivate int NTGhostscriptEXE(char *path,int length) if (*program == '\0') { if (NTGhostscriptGetString("GS_DLL",&is_64_bit_version,program, - sizeof(program)) == FALSE) - return(FALSE); - p=strrchr(program,'\\'); - if (p != (char *) NULL) + sizeof(program)) != FALSE) { - p++; - *p='\0'; - (void) ConcatenateMagickString(program,is_64_bit_version ? - "gswin64c.exe" : "gswin32c.exe",sizeof(program)); + p=strrchr(program,'\\'); + if (p != (char *) NULL) + { + p++; + *p='\0'; + (void) ConcatenateMagickString(program,is_64_bit_version ? + "gswin64c.exe" : "gswin32c.exe",sizeof(program)); + } } } UnlockSemaphoreInfo(ghost_semaphore);