bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)

va_end() must be called before returning.
This commit is contained in:
Zackery Spytz 2022-02-06 23:40:54 -08:00 committed by GitHub
parent a335d98f19
commit 59e004af63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
Add a missing call to ``va_end()`` in ``Modules/_hashopenssl.c``.

View File

@ -266,6 +266,7 @@ _setException(PyObject *exc, const char* altmsg, ...)
} else { } else {
PyErr_FormatV(exc, altmsg, vargs); PyErr_FormatV(exc, altmsg, vargs);
} }
va_end(vargs);
return NULL; return NULL;
} }
va_end(vargs); va_end(vargs);