From: Cristy Date: Sat, 19 Aug 2017 11:13:06 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/684 X-Git-Tag: 7.0.6-9~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=178482b232c5abfafc5b201b59b794f3b45c4e72;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/684 --- diff --git a/MagickCore/xml-tree.c b/MagickCore/xml-tree.c index bd305da15..8e1957786 100644 --- a/MagickCore/xml-tree.c +++ b/MagickCore/xml-tree.c @@ -2732,7 +2732,7 @@ static char *XMLTreeTagToXML(XMLTreeInfo *xml_info,char **source,size_t *length, if (*xml_info->content != '\0') *length+=FormatLocaleString(*source+(*length),*extent,"", xml_info->tag); - while ((content[offset] != '\0') && (offset < xml_info->offset)) + while ((offset < xml_info->offset) && (content[offset] != '\0')) offset++; if (xml_info->ordered != (XMLTreeInfo *) NULL) content=XMLTreeTagToXML(xml_info->ordered,source,length,extent,offset,