Functions in util.c are missing a few error checks

Bug #499617 reported by Ziga Seilnacht
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyOpenSSL
New
Undecided
Unassigned

Bug Description

The functions in util.c are missing a few NULL checks for values returned by PyList_New, Py_BuildValue and error_queue_to_list.

I'll attach a branch that fixes this and a few other minor nits in that file. I hope it's OK if I don't list each error in the bug report, they should be obvious from the changesets in that branch.

This is the first part of the promised bugfixes found while working on client_CA branch. I'll try to submit the next one today, hopefully the reports will be granular enough that they will be easy to merge into trunk.

Related branches

Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

Thanks for working on this. Ideally there would be some unit test coverage of these code paths to verify they work properly. I don't expect will be easy to write such tests, though, as the CPython C APIs will need to be made to fail to exercise the relevant code. The only thoughts I have on that involve doing nasty things at the C level.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.