Cristy
2026-03-24 11:33:21 -04:00
parent cca607366f
commit ae679e2fd1
+2 -2
View File
@@ -1919,8 +1919,8 @@ MagickExport XMLTreeInfo *NewXMLTree(const char *xml,ExceptionInfo *exception)
"ParseError","UTF16 to UTF8 failed");
return((XMLTreeInfo *) NULL);
}
terminal=utf8[length-1];
utf8[length-1]='\0';
terminal=utf8[MagickMax(length-1,0)];
utf8[MagickMax(length-1,0)]='\0';
p=utf8;
while ((*p != '\0') && (*p != '<'))
p++;