]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11799
authorCristy <urban-warrior@imagemagick.org>
Tue, 11 Dec 2018 01:00:25 +0000 (20:00 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 11 Dec 2018 01:00:25 +0000 (20:00 -0500)
MagickCore/utility.c

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