From e473ef77ffbda9e358a47f90597c74d5bfc1af6d Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 24 Mar 2018 14:22:40 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6904 --- MagickCore/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MagickCore/string.c b/MagickCore/string.c index 6cd3c5991..d2d15bc93 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -2409,8 +2409,8 @@ MagickExport char **StringToList(const char *text) for (q=p; *q != '\0'; q++) if ((*q == '\r') || (*q == '\n')) break; - textlist[i]=(char *) AcquireQuantumMemory((size_t) (q-p)+ - MagickPathExtent,sizeof(**textlist)); + textlist[i]=(char *) AcquireQuantumMemory((size_t) (q-p)+1, + sizeof(**textlist)); if (textlist[i] == (char *) NULL) ThrowFatalException(ResourceLimitFatalError,"UnableToConvertText"); (void) memcpy(textlist[i],p,(size_t) (q-p)); -- 2.40.0