Message73700
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()
--- |
|
Date |
User |
Action |
Args |
2008-09-24 10:02:33 | vstinner | set | recipients:
+ vstinner |
2008-09-24 10:02:33 | vstinner | set | messageid: <1222250553.13.0.674938017839.issue3954@psf.upfronthosting.co.za> |
2008-09-24 10:02:27 | vstinner | link | issue3954 messages |
2008-09-24 10:02:27 | vstinner | create | |
|