getPrime with invalid input causes Python to abort with fatal error
Bug #988431 reported by
Legrandin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The following code:
from Crypto import Random
from Crypto.Util.number import *
getPrime(1, Random.new().read)
always makes python raise an exotic exception:
Fatal Python error: PyEval_SaveThread: NULL tstate
Any Pycrypto version up to 2.5.0 on x86.
summary: |
- isPrime fails on invalid input + getPrime fails on invalid input |
summary: |
- getPrime fails on invalid input + getPrime with invalid input causes Python to abort with fatal error |
To post a comment you must log in.
Here's the place where it fails:
#4 0x00007f343a5c2379 in isPrime (self=<optimized out>, args=<optimized out>, kwargs=<optimized out>) at src/_fastmath. c:1046
1046 Py_UNBLOCK_THREADS;