if (draw_info == (DrawInfo *) NULL)
return(clone_info);
exception=AcquireExceptionInfo();
- if (clone_info->primitive != (char *) NULL)
+ if (draw_info->primitive != (char *) NULL)
(void) CloneString(&clone_info->primitive,draw_info->primitive);
if (draw_info->geometry != (char *) NULL)
(void) CloneString(&clone_info->geometry,draw_info->geometry);
draw_info->primitive=FileToString(image->filename,~0UL,exception);
else
{
- draw_info->primitive=(char *) AcquireMagickMemory(GetBlobSize(image)+1);
- if (draw_info->primitive != (char *) NULL)
+ MagickSizeType
+ length;
+
+ length=GetBlobSize(image);
+ if (length == (MagickSizeType) ((size_t) length))
{
- memcpy(draw_info->primitive,GetBlobStreamData(image),
- GetBlobSize(image));
- draw_info->primitive[GetBlobSize(image)]='\0';
- }
+ draw_info->primitive=(char *) AcquireMagickMemory((size_t) length+1);
+ if (draw_info->primitive != (char *) NULL)
+ {
+ memcpy(draw_info->primitive,GetBlobStreamData(image),(size_t)
+ length);
+ draw_info->primitive[length]='\0';
+ }
+ }
}
if (draw_info->primitive == (char *) NULL)
{
MAGICK_VERSION=7.0.8-8
-MAGICK_GIT_REVISION=14562:464afd74f:20180717
+MAGICK_GIT_REVISION=14564:889476acc:20180719
# Substitute library versioning