summaryrefslogtreecommitdiff
path: root/Modules/sha512module.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
commit3b0e4320092ac0504b6670cafaf0301b908c91fc (patch)
treed3be1b6b844d61763bb366fa21ceed475e5703fd /Modules/sha512module.c
parentb2fa705fd3887c326e811c418469c784353027f4 (diff)
parentf687fbcd73c14dfcbe086eb5cd94b298f1e81e72 (diff)
downloadcpython-3b0e4320092ac0504b6670cafaf0301b908c91fc.tar.gz
Issue #29392: Prevent crash when passing invalid arguments into msvcrt module.
Diffstat (limited to 'Modules/sha512module.c')
-rw-r--r--Modules/sha512module.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/Modules/sha512module.c b/Modules/sha512module.c
index 17775ae57b..5ac2a2a61c 100644
--- a/Modules/sha512module.c
+++ b/Modules/sha512module.c
@@ -548,13 +548,8 @@ SHA512Type_update(SHAobject *self, PyObject *obj)
sha512_update(self, buf.buf, buf.len);
PyBuffer_Release(&buf);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-/*[clinic input]
-dump buffer
-[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
static PyMethodDef SHA_methods[] = {
SHA512TYPE_COPY_METHODDEF
@@ -748,11 +743,6 @@ _sha512_sha384_impl(PyObject *module, PyObject *string)
}
-/*[clinic input]
-dump buffer
-[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
-
/* List of functions exported by this module */
static struct PyMethodDef SHA_functions[] = {