]> granicus.if.org Git - imagemagick/commitdiff
https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=35177
authorCristy <urban-warrior@imagemagick.org>
Sat, 15 Dec 2018 17:34:29 +0000 (12:34 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 15 Dec 2018 17:34:29 +0000 (12:34 -0500)
MagickCore/utility.c

index 0e3c008f13446357b104d8ff7a10936465a135fd..539154f77e4d7571f7cdd1076524d5aad5c1094b 100644 (file)
@@ -1363,10 +1363,8 @@ MagickExport void GetPathComponent(const char *path,PathType type,
     case SubimagePath:
     {
       *component='\0';
-      if ((subimage_length != 0) &&
-          (magick_length+subimage_offset) < strlen(path))
-        (void) CopyMagickString(component,path+magick_length+subimage_offset,
-          subimage_length);
+      if ((subimage_length != 0) && (magick_length < subimage_offset))
+        (void) CopyMagickString(component,path+subimage_offset,subimage_length);
       break;
     }
     case SubcanonicalPath: