summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-02-07 08:05:29 (GMT)
committerGitHub <noreply@github.com>2022-02-07 08:05:29 (GMT)
commit3ceff9968be059209f0d7271365f38895207b24d (patch)
tree965c8df967a057367f5054dee4e2c163558f3ff6
parentcb789944b22311b5a6de3c1c4f8bc4044ddb949a (diff)
downloadcpython-3ceff9968be059209f0d7271365f38895207b24d.zip
cpython-3ceff9968be059209f0d7271365f38895207b24d.tar.gz
cpython-3ceff9968be059209f0d7271365f38895207b24d.tar.bz2
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
va_end() must be called before returning. (cherry picked from commit 59e004af63742361b67d1e1ae70229ff0db1059d) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2022-02-06-23-08-30.bpo-40479.zED3Zu.rst1
-rw-r--r--Modules/_hashopenssl.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-02-06-23-08-30.bpo-40479.zED3Zu.rst b/Misc/NEWS.d/next/Core and Builtins/2022-02-06-23-08-30.bpo-40479.zED3Zu.rst
new file mode 100644
index 0000000..52701d5
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2022-02-06-23-08-30.bpo-40479.zED3Zu.rst
@@ -0,0 +1 @@
+Add a missing call to ``va_end()`` in ``Modules/_hashopenssl.c``.
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 2eaa5f7..65538f6 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -266,6 +266,7 @@ _setException(PyObject *exc, const char* altmsg, ...)
} else {
PyErr_FormatV(exc, altmsg, vargs);
}
+ va_end(vargs);
return NULL;
}
va_end(vargs);