From: Cristy Date: Tue, 11 Dec 2018 01:00:25 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11799 X-Git-Tag: 7.0.8-17~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75db19882ea8b1801e439e6e9d19b3042a82de4c;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11799 --- diff --git a/MagickCore/utility.c b/MagickCore/utility.c index 75d36558c..0e3c008f1 100644 --- a/MagickCore/utility.c +++ b/MagickCore/utility.c @@ -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;