diff --git a/expat/Changes b/expat/Changes index 40b716d9..69c39f37 100644 --- a/expat/Changes +++ b/expat/Changes @@ -3,12 +3,20 @@ NOTE: We are looking for help with a few things: If you can help, please get in touch. Thanks! Release X.X.X XXX XXXXX XX XXXX + Bug fixes: + #332 #470 For (non-default) compilation with -DEXPAT_MIN_SIZE=ON (CMake) + or CPPFLAGS=-DXML_MIN_SIZE (GNU Autotools): Fix segfault + for UTF-16 payloads containing CDATA sections. + Other changes: #457 Unexpose symbol _INTERNAL_trim_to_complete_utf8_characters #458 #459 CMake: Support absolute paths for both CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR #468 #469 xmlwf: Improve help output and the xmlwf man page + Special thanks to: + Dimitry Andric + Release 2.3.0 Thu March 25 2021 Bug fixes: #438 When calling XML_ParseBuffer without a prior successful call to diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c index d9474240..7759ffb6 100644 --- a/expat/lib/xmltok.c +++ b/expat/lib/xmltok.c @@ -259,8 +259,14 @@ sb_byteToAscii(const ENCODING *enc, const char *p) { #define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p)) #define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p)) -#define IS_INVALID_CHAR(enc, p, n) \ - (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p)) +#ifdef XML_MIN_SIZE +# define IS_INVALID_CHAR(enc, p, n) \ + (AS_NORMAL_ENCODING(enc)->isInvalid##n \ + && AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p)) +#else +# define IS_INVALID_CHAR(enc, p, n) \ + (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p)) +#endif #ifdef XML_MIN_SIZE # define IS_NAME_CHAR_MINBPC(enc, p) \