Message 333176 - Python tracker

Message333176

Author cstratak
Recipients cstratak
Date 2019-01-07.16:41:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546879265.59.0.976013250068.issue35680@roundup.psfhosted.org>
In-reply-to
Content
Results from a recent static analysis scan for python2:

Error: USE_AFTER_FREE (CWE-825):
Python-2.7.15/Modules/_bsddb.c:6697: freed_arg: "free" frees "name".
Python-2.7.15/Modules/_bsddb.c:6715: pass_freed_arg: Passing freed pointer "name" as an argument to "Py_BuildValue".

6713|       RETURN_IF_ERR();  /* Maybe the size is not the problem */
6714|   
6715|->     retval = Py_BuildValue("s", name);
6716|       free(name);
6717|       return retval;

Attaching a draft patch.
History
Date User Action Args
2019-01-07 16:41:07cstrataksetrecipients: + cstratak
2019-01-07 16:41:05cstrataksetmessageid: <1546879265.59.0.976013250068.issue35680@roundup.psfhosted.org>
2019-01-07 16:41:05cstrataklinkissue35680 messages
2019-01-07 16:41:05cstratakcreate