Errors seen in python-crypto-2.5-1.fc17

This is a summary of errors seen when compiling with an experimental static analysis tool

Raw build logs can be seen here

Segfaults in normal paths

Code paths that will lead to a segmentatation fault

src/_fastmath.c getRNG calling PyObject_CallObject with NULL as argument 1 (new_func) at src/_fastmath.c:1108

Segfaults within error-handling paths

Code paths in error-handling that will lead to a segmentatation fault (e.g. under low memory conditions)

src/_fastmath.c getRandomInteger dereferencing NULL (rand_bytes->ob_type) at src/_fastmath.c:1158
src/_fastmath.c getRandomInteger dereferencing NULL (arglist->ob_refcnt) at src/_fastmath.c:1157
src/_fastmath.c rsaKey_new dereferencing NULL (key->n) at src/_fastmath.c:706
src/_fastmath.c init_fastmath calling PyDict_SetItemString with NULL as argument 3 (fastmathError.1) at src/_fastmath.c:1653
src/_fastmath.c dsaKey_new dereferencing NULL (key->y) at src/_fastmath.c:469

Possible reference leaks

Code paths in which the reference count of an object might too large - but in which the reference in question came from a function not known to the analyzer.

The analyzer assumes such references are new references, but if the function returns a borrowed reference instead, it's probably not a bug

src/_fastmath.c dsaKey__sign ob_refcnt of '*lr' is 1 too high
src/_fastmath.c dsaKey__sign ob_refcnt of '*ls' is 1 too high
src/_fastmath.c rsaKey__blind ob_refcnt of '*r' is 1 too high
src/_fastmath.c rsaKey__encrypt ob_refcnt of '*r' is 1 too high
src/_fastmath.c rsaKey__unblind ob_refcnt of '*r' is 1 too high
src/_fastmath.c rsaKey__decrypt ob_refcnt of '*r' is 1 too high