This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2008-09-24.10:02:26
SpamBayes Score 5.17425e-08
Marked as misclassified No
Message-id <1222250553.13.0.674938017839.issue3954@psf.upfronthosting.co.za>
In-reply-to
Content
Using Fusil the fuzzer, I found a "minor" bug in _hotshot module: it 
doesn't check correctly the errors in hotshot_logreader(). On error, 
an exception is raised (eg. by eof_error()) but the result is a 
pointer to a new allocated object instead of NULL.

Here is a patch to delete the new created object (using Py_DECREF) and 
return NULL. It uses an ugly goto, but goto is sometimes useful to 
avoid code duplication on error handling (eg. see Linux source code).

Example to reproduce the bug:
---
import _hotshot, gc
_hotshot.logreader(".")
gc.collect()
---
History
Date User Action Args
2008-09-24 10:02:33vstinnersetrecipients: + vstinner
2008-09-24 10:02:33vstinnersetmessageid: <1222250553.13.0.674938017839.issue3954@psf.upfronthosting.co.za>
2008-09-24 10:02:27vstinnerlinkissue3954 messages
2008-09-24 10:02:27vstinnercreate