diff options
Diffstat (limited to 'Modules/expat/expat.h')
-rw-r--r-- | Modules/expat/expat.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/expat/expat.h b/Modules/expat/expat.h index cf113ee..cffdb8f 100644 --- a/Modules/expat/expat.h +++ b/Modules/expat/expat.h @@ -883,6 +883,15 @@ XMLPARSEAPI(int) XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing parsing); +/* Sets the hash salt to use for internal hash calculations. + Helps in preventing DoS attacks based on predicting hash + function behavior. This must be called before parsing is started. + Returns 1 if successful, 0 when called after parsing has started. +*/ +XMLPARSEAPI(int) +XML_SetHashSalt(XML_Parser parser, + unsigned long hash_salt); + /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then XML_GetErrorCode returns information about the error. */ |