aboutsummaryrefslogtreecommitdiff
path: root/libstudxml/details/expat/xmltok.h
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-25 14:21:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-25 14:21:51 +0200
commit8557179f8cd9afa9f01079aec954e4ee5958f32c (patch)
tree25e0915768d7c8f2652e4900100c418748b43769 /libstudxml/details/expat/xmltok.h
parent8242a224d43203999fceccc27f48989db2276221 (diff)
Fix security issues in bundled expat
Specifically, the following patches from the Debian 2.1.0-6+deb8u6 package were applied: CVE-2018-20843.patch CVE-2015-1283.patch CVE-2015-1283-refix.patch CVE-2016-0718-v2-2-1.patch cve-2012-6702-plus-cve-2016-5300-v1.patch CVE-2017-9233.patch CVE-2016-9063.patch CVE-2019-15903.patch Additionally, hashing code has been changed to use size_t instead of unsigned long (which is 32-bit on 64-bit Windows).
Diffstat (limited to 'libstudxml/details/expat/xmltok.h')
-rw-r--r--libstudxml/details/expat/xmltok.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/libstudxml/details/expat/xmltok.h b/libstudxml/details/expat/xmltok.h
index ca867aa..752007e 100644
--- a/libstudxml/details/expat/xmltok.h
+++ b/libstudxml/details/expat/xmltok.h
@@ -130,6 +130,12 @@ typedef int (PTRCALL *SCANNER)(const ENCODING *,
const char *,
const char **);
+enum XML_Convert_Result {
+ XML_CONVERT_COMPLETED = 0,
+ XML_CONVERT_INPUT_INCOMPLETE = 1,
+ XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */
+};
+
struct encoding {
SCANNER scanners[XML_N_STATES];
SCANNER literalScanners[XML_N_LITERAL_TYPES];
@@ -158,12 +164,12 @@ struct encoding {
const char *ptr,
const char *end,
const char **badPtr);
- void (PTRCALL *utf8Convert)(const ENCODING *enc,
+ enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
char **toP,
const char *toLim);
- void (PTRCALL *utf16Convert)(const ENCODING *enc,
+ enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
unsigned short **toP,