Skip to content

Commit 3ceff99

Browse files
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
va_end() must be called before returning. (cherry picked from commit 59e004a) Co-authored-by: Zackery Spytz <[email protected]>
1 parent cb78994 commit 3ceff99

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a missing call to ``va_end()`` in ``Modules/_hashopenssl.c``.

Modules/_hashopenssl.c

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ _setException(PyObject *exc, const char* altmsg, ...)
266266
} else {
267267
PyErr_FormatV(exc, altmsg, vargs);
268268
}
269+
va_end(vargs);
269270
return NULL;
270271
}
271272
va_end(vargs);

0 commit comments

Comments
 (0)