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:
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user