string_info->length+MagickPathExtent,sizeof(*string_info->datum));
if (string_info->datum == (unsigned char *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ (void) memset(string_info->datum,0,length+MagickPathExtent);
return(string_info);
}
\f
}
if (blob != (const void *) NULL)
(void) memcpy(string_info->datum,blob,length);
- else
- (void) memset(string_info->datum,0,length);
+ (void) memset(string_info->datum+length,0,MagickPathExtent);
return(string_info);
}
\f
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CloneString() replaces or frees the destination string to make it
-% a clone of the input string plus MagickPathExtent more space so the string
+% a clone of the input string plus MagickPathExtent more space so the string
% may be worked on.
%
% If source is a NULL pointer the destination string will be freed and set to
break;
p++;
}
- (void) FormatLocaleFile(file,"%s(%.20g): ",id,(double) string_info->length);
+ (void) FormatLocaleFile(file,"%s(%.20g):\n",id,(double) string_info->length);
if (i == string_info->length)
{
for (i=0; i < string_info->length; i++)
const char
*q;
-
+
register char
*p;
-
+
static char
whitelist[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 "
"$-_.+!*'(),{}|\\^~[]`\"><#%;/?:@&=";
-
+
sanitize_source=AcquireString(source);
p=sanitize_source;
q=sanitize_source+strlen(sanitize_source);