Functions in util.c are missing a few error checks
Bug #499617 reported by
Ziga Seilnacht
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_
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
lp://staging/~zseil/pyopenssl/util-cleanup
Ready for review
for merging
into
lp://staging/~exarkun/pyopenssl/trunk
- Jean-Paul Calderone: Pending requested
-
Diff: 96 lines (+40/-19)2 files modifiedsrc/util.c (+40/-18)
src/util.h (+0/-1)
To post a comment you must log in.
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.