New submission from Michael Fötsch <[email protected]>:
If the "name" argument to "_hashlib.new()" is not a string, the reference count
for the "string" argument is not decremented.
In the file "Modules/_hashopenssl.c", function "EVP_new()", a call to
"PyBuffer_Release()" is missing:
if (!PyArg_Parse(name_obj, "s", &name)) {
+ PyBuffer_Release(&view);
PyErr_SetString(PyExc_TypeError, "name must be a string");
return NULL;
}
----------
components: Library (Lib)
messages: 164274
nosy: mfoetsch
priority: normal
severity: normal
status: open
title: Leak in "_hashlib.new()" if argument is not a string
type: resource usage
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15219>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com