]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sat, 7 Oct 2017 20:33:00 +0000 (16:33 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 7 Oct 2017 20:33:13 +0000 (16:33 -0400)
MagickCore/module.c

index 5539ccda6eda7b8fff5185080f7e86dc02012e3b..24487e16acfc41685f55fed6fd1a5687703f513f 100644 (file)
@@ -582,6 +582,15 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
           (void) ConcatenateMagickString(path,DirectorySeparator,
             MagickPathExtent);
         (void) ConcatenateMagickString(path,filename,MagickPathExtent);
+#if defined(MAGICKCORE_HAVE_REALPATH)
+        {
+          char
+            resolved_path[PATH_MAX+1];
+
+          if (realpath(path,resolved_path) != (char *) NULL)
+            (void) CopyMagickString(path,resolved_path,MagickPathExtent);
+        }
+#endif
         if (IsPathAccessible(path) != MagickFalse)
           {
             module_path=DestroyString(module_path);