cpython: e5871ffe9ac0 (original) (raw)

Mercurial > cpython

changeset 103304:e5871ffe9ac0

Issue #16113: SHA3: allocate extra memory for lane extraction and check return value of PyModule_Create() [#16113]

Christian Heimes christian@python.org
date Thu, 08 Sep 2016 13:35:00 +0200
parents d69e0df64b11
children fa89fff0b52c
files Modules/_sha3/sha3module.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-)[+] [-] Modules/_sha3/sha3module.c 16

line wrap: on

line diff

--- a/Modules/_sha3/sha3module.c +++ b/Modules/_sha3/sha3module.c @@ -114,6 +114,7 @@ #endif #define SHA3_MAX_DIGESTSIZE 64 /* 64 Bytes (512 Bits) for 224 to 512 / +#define SHA3_LANESIZE 96 / ExtractLane needs an extra 96 bytes */ #define SHA3_state Keccak_HashInstance #define SHA3_init Keccak_HashInitialize #define SHA3_process Keccak_HashUpdate @@ -310,7 +311,7 @@ static PyObject _sha3_sha3_224_digest_impl(SHA3object self) /[clinic end generated code: output=fd531842e20b2d5b input=a5807917d219b30e]/ {

#define init_sha3type(name, type) [](#l1.52) do { [](#l1.53)