xml=p+offset;
entity=strchr(xml,';');
}
- (void) CopyMagickMemory(xml+length,entity+1,strlen(entity));
+ if (entity != (char *) NULL)
+ (void) CopyMagickMemory(xml+length,entity+1,strlen(entity));
(void) strncpy(xml,entities[i],length);
}
}
return;
xml[length]='\0';
xml=ParseEntities(xml,root->entities,state);
- if (*xml_info->content != '\0')
+ if ((xml_info->content != (char *) NULL) && (*xml_info->content != '\0'))
{
(void) ConcatenateString(&xml_info->content,xml);
xml=DestroyString(xml);
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
root->processing_instructions[i][j+2]=(char *) ResizeQuantumMemory(
root->processing_instructions[i][j+1],(size_t) (j+1),
- sizeof(**root->processing_instructions));
+ sizeof(*root->processing_instructions));
if (root->processing_instructions[i][j+2] == (char *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) CopyMagickString(root->processing_instructions[i][j+2]+j-1,
*xml='\0';
i=0;
while ((root->attributes[i] != (char **) NULL) &&
+ (n != (char *) NULL) &&
(strcmp(n,root->attributes[i][0]) != 0))
i++;
while ((*(n=xml+strspn(xml+1,XMLWhitespace)+1) != '\0') &&
xml_info->tag=ConstantString(tag);
else
xml_info=AddChildToXMLTree(xml_info,tag,strlen(xml_info->content));
- xml_info->attributes=attributes;
+ if (xml_info != (XMLTreeInfo *) NULL)
+ xml_info->attributes=attributes;
root->node=xml_info;
}
j-=2;
(void) CopyMagickMemory(xml_info->attributes[j+1]+(i/2),
xml_info->attributes[j+1]+(i/2)+1,(size_t) (((j+2)/2)-(i/2))*
- sizeof(*xml_info->attributes));
+ sizeof(**xml_info->attributes));
return(xml_info);
}
\f