From 75db19882ea8b1801e439e6e9d19b3042a82de4c Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 10 Dec 2018 20:00:25 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11799 --- MagickCore/utility.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.40.0