diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-08-20 17:02:02 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-08-20 17:03:10 +0200 |
commit | c21e9cd5d955e4d8afa514e1f7736ce6a9bb8f2e (patch) | |
tree | 3159b7ecb84cb57282ac3a4e17a5c3a926dd5315 /parserInternals.c | |
parent | 5b2d07a72670513e41b481a9d922c983a64027ca (diff) | |
download | libxml2-c21e9cd5d955e4d8afa514e1f7736ce6a9bb8f2e.tar.gz |
Use xmlStrlen in xmlNewStringInputStream
xmlStrlen handles buffers larger than INT_MAX more gracefully.
Diffstat (limited to 'parserInternals.c')
-rw-r--r-- | parserInternals.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parserInternals.c b/parserInternals.c index 7dc06c88..c3a14ac0 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -1356,7 +1356,7 @@ xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) { xmlGenericError(xmlGenericErrorContext, "new fixed input: %.30s\n", buffer); buf = xmlParserInputBufferCreateMem((const char *) buffer, - strlen((const char *) buffer), + xmlStrlen(buffer), XML_CHAR_ENCODING_NONE); if (buf == NULL) { xmlErrMemory(ctxt, NULL); |