stillson / rdrand

python interface to intel hardware RNG
Other
26 stars 10 forks source link

Fix return value from RdSeed_cpuid() #9

Open blubberdiblub opened 6 years ago

blubberdiblub commented 6 years ago

The function returned info[1] (which is the content of the ebx register) instead of 0 when it detected that rdseed is unavailable. This is likely a remnant from an earlier iteration of the code.

While it is unlikely that it will show up as bug (all of the bits of ebx would have to be cleared, except bit #0 which would have to be set) due to the calling function comparing the return value explicitly with 1, it's still better to fix it.