]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
authorZackery Spytz <zspytz@gmail.com>
Mon, 7 Feb 2022 07:40:54 +0000 (23:40 -0800)
committerGitHub <noreply@github.com>
Mon, 7 Feb 2022 07:40:54 +0000 (23:40 -0800)
va_end() must be called before returning.

Misc/NEWS.d/next/Core and Builtins/2022-02-06-23-08-30.bpo-40479.zED3Zu.rst [new file with mode: 0644]
Modules/_hashopenssl.c

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 (file)
index 0000000..52701d5
--- /dev/null
@@ -0,0 +1 @@
+Add a missing call to ``va_end()`` in ``Modules/_hashopenssl.c``.
index fb155b2e62253175e72c49c69ef34ec85f2d2e16..bb9487204e741586242a86a47d8ba112700ba984 100644 (file)
@@ -266,6 +266,7 @@ _setException(PyObject *exc, const char* altmsg, ...)
         } else {
             PyErr_FormatV(exc, altmsg, vargs);
         }
+        va_end(vargs);
         return NULL;
     }
     va_end(vargs);