1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Use xmlStrlen in *CtxtReadDoc

xmlStrlen handles buffers larger than INT_MAX more gracefully.
This commit is contained in:
Nick Wellnhofer
2022-08-20 17:00:50 +02:00
parent b1b654171e
commit 5b2d07a726
2 changed files with 4 additions and 9 deletions

View File

@ -7116,13 +7116,10 @@ htmlDocPtr
htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur,
const char *URL, const char *encoding, int options)
{
const char *buf;
if (cur == NULL)
return (NULL);
buf = (const char *) cur;
return (htmlCtxtReadMemory(ctxt, buf, strlen(buf), URL, encoding,
options));
return (htmlCtxtReadMemory(ctxt, (const char *) cur, xmlStrlen(cur), URL,
encoding, options));
}
/**