summaryrefslogtreecommitdiff
path: root/src/_fastmath.c
diff options
context:
space:
mode:
authorDwayne C. Litzenberger <dlitz@dlitz.net>2010-06-10 23:45:35 -0400
committerDwayne C. Litzenberger <dlitz@dlitz.net>2010-06-10 23:48:49 -0400
commitb558e58731c80cdcc6fff378be81ee99653dc635 (patch)
tree991e3f19602198fbfa9bdeb03d9ba037ba28428d /src/_fastmath.c
parent84715e632d23d1b4938419ebfbddcf1fcd9c9176 (diff)
downloadpycrypto-b558e58731c80cdcc6fff378be81ee99653dc635.tar.gz
Fix potential uninitialized use of randfunc pointer
This could occur if getRNG() returns NULL.
Diffstat (limited to 'src/_fastmath.c')
-rwxr-xr-xsrc/_fastmath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_fastmath.c b/src/_fastmath.c
index d1c984f..a172d81 100755
--- a/src/_fastmath.c
+++ b/src/_fastmath.c
@@ -893,7 +893,7 @@ getRNG (void)
static int
getRandomNumber (mpz_t n, unsigned long int bits, PyObject *randfunc_)
{
- PyObject *arglist, *randfunc, *rng=NULL, *rand_bytes=NULL;
+ PyObject *arglist, *randfunc=NULL, *rng=NULL, *rand_bytes=NULL;
int return_val = 1;
unsigned long int bytes = bits / 8;
unsigned long int odd_bits = bits % 8;