Skip to content

Commit 0892a0e

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 1b8a34a commit 0892a0e

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
@@ -311,6 +311,7 @@ _setException(PyObject *exc, const char* altmsg, ...)
311311
} else {
312312
PyErr_FormatV(exc, altmsg, vargs);
313313
}
314+
va_end(vargs);
314315
return NULL;
315316
}
316317
va_end(vargs);

0 commit comments

Comments
 (0)