mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146)
The C accelerated _elementtree module now initializes hash randomization salt from _Py_HashSecret instead of libexpat's default CPRNG. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue34623
This commit is contained in:
parent
0185f34ddc
commit
cb5778f00c
4 changed files with 15 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/* note: you must import expat.h before importing this module! */
|
||||
|
||||
#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0"
|
||||
#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1"
|
||||
#define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
|
||||
|
||||
struct PyExpat_CAPI
|
||||
|
|
@ -48,6 +48,8 @@ struct PyExpat_CAPI
|
|||
enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding);
|
||||
int (*DefaultUnknownEncodingHandler)(
|
||||
void *encodingHandlerData, const XML_Char *name, XML_Encoding *info);
|
||||
/* might be none for expat < 2.1.0 */
|
||||
int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
|
||||
/* always add new stuff to the end! */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue