diff options
author | Samanta Navarro <ferivoz@riseup.net> | 2022-02-15 11:56:57 +0000 |
---|---|---|
committer | Samanta Navarro <ferivoz@riseup.net> | 2022-02-15 12:16:57 +0000 |
commit | efcb347440ade24b9f1054671e6bd05e60b4cafd (patch) | |
tree | 49d52a0a1c9e168460d996cb6807147243e1cead | |
parent | 81b89678e200820271b72cacdd45fb5868855765 (diff) | |
download | libexpat-git-efcb347440ade24b9f1054671e6bd05e60b4cafd.tar.gz |
Prevent integer overflow in copyString
The copyString function is only used for encoding string supplied by
the library user.
-rw-r--r-- | expat/lib/xmlparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 4b43e613..a39377c2 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -7412,7 +7412,7 @@ getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr, static XML_Char * copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) { - int charsRequired = 0; + size_t charsRequired = 0; XML_Char *result; /* First determine how long the string is */ |