Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,16 @@ LIBEXPAT_HEADERS= \
Modules/expat/expat.h \
Modules/expat/expat_config.h \
Modules/expat/expat_external.h \
Modules/expat/fallthrough.h \
Modules/expat/iasciitab.h \
Modules/expat/internal.h \
Modules/expat/latin1tab.h \
Modules/expat/memory_sanitizer.h \
Modules/expat/nametab.h \
Modules/expat/pyexpatns.h \
Modules/expat/siphash.h \
Modules/expat/utf8tab.h \
Modules/expat/xcsinc.c \
Modules/expat/xmlrole.h \
Modules/expat/xmltok.h \
Modules/expat/xmltok_impl.h \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.2.
85 changes: 71 additions & 14 deletions Misc/sbom.spdx.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Modules/expat/expat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
*/
# define XML_MAJOR_VERSION 2
# define XML_MINOR_VERSION 8
# define XML_MICRO_VERSION 1
# define XML_MICRO_VERSION 2

# ifdef __cplusplus
}
Expand Down
49 changes: 49 additions & 0 deletions Modules/expat/fallthrough.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2026 Nick Begg <nick@stunttruck.net>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#ifndef FALLTHROUGH_H
# define FALLTHROUGH_H 1

// Explicit fallthrough in switch case to avoid warnings
// with compiler flag -Wimplicit-fallthrough.

# define EXPAT_FALLTHROUGH \
do { \
} while (0)

# if defined(__has_attribute)
# if __has_attribute(fallthrough)
# undef EXPAT_FALLTHROUGH
# define EXPAT_FALLTHROUGH __attribute__((fallthrough))
# endif
# endif

#endif // FALLTHROUGH_H
51 changes: 51 additions & 0 deletions Modules/expat/memory_sanitizer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser

Copyright (c) 2026 Matthew Fernandez <matthew.fernandez@gmail.com>
Licensed under the MIT license:

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#if ! defined(MEMORY_SANITIZER_H)
# define MEMORY_SANITIZER_H 1

# if defined(__has_feature)
# if __has_feature(memory_sanitizer)
# include <sanitizer/msan_interface.h>

// inform Memory Sanitizer that [base, base + extent) is now initialized
# define MSAN_UNPOISON(base, extent) __msan_unpoison((base), (extent))

# endif
# endif

# if ! defined(MSAN_UNPOISON)
# define MSAN_UNPOISON(base, extent) \
do { \
} while (0)
# endif

#endif // ! defined(MEMORY_SANITIZER_H)
9 changes: 6 additions & 3 deletions Modules/expat/refresh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ fi

# Update this when updating to a new version after verifying that the changes
# the update brings in are good. These values are used for verifying the SBOM, too.
expected_libexpat_tag="R_2_8_1"
expected_libexpat_version="2.8.1"
expected_libexpat_sha256="a52eb72108be160e190b5cafa5bba8663f1313f2013e26060d1c18e26e31067b"
expected_libexpat_tag="R_2_8_2"
expected_libexpat_version="2.8.2"
expected_libexpat_sha256="ef7d1994f533c9e7343d6c19f31064fc8ebbcbcaa144be3812b4f43052a05f4c"

expat_dir="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")"
cd ${expat_dir}
Expand All @@ -33,13 +33,16 @@ lib_files=(
asciitab.h
expat.h
expat_external.h
fallthrough.h
iasciitab.h
internal.h
latin1tab.h
memory_sanitizer.h
nametab.h
siphash.h
utf8tab.h
winconfig.h
xcsinc.c
xmlparse.c
xmlrole.c
xmlrole.h
Expand Down
15 changes: 8 additions & 7 deletions Modules/expat/siphash.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@

#include <stddef.h> /* size_t */
#include <stdint.h> /* uint64_t uint32_t uint8_t */
#include "fallthrough.h"

/*
* Workaround to not require a C++11 compiler for using ULL suffix
Expand Down Expand Up @@ -234,25 +235,25 @@ sip24_final(struct siphash *H) {
switch (left) {
case 7:
b |= (uint64_t)H->buf[6] << 48;
/* fall through */
EXPAT_FALLTHROUGH;
case 6:
b |= (uint64_t)H->buf[5] << 40;
/* fall through */
EXPAT_FALLTHROUGH;
case 5:
b |= (uint64_t)H->buf[4] << 32;
/* fall through */
EXPAT_FALLTHROUGH;
case 4:
b |= (uint64_t)H->buf[3] << 24;
/* fall through */
EXPAT_FALLTHROUGH;
case 3:
b |= (uint64_t)H->buf[2] << 16;
/* fall through */
EXPAT_FALLTHROUGH;
case 2:
b |= (uint64_t)H->buf[1] << 8;
/* fall through */
EXPAT_FALLTHROUGH;
case 1:
b |= (uint64_t)H->buf[0] << 0;
/* fall through */
EXPAT_FALLTHROUGH;
case 0:
break;
}
Expand Down
Loading
Loading