projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
minor change for the prng
[openssl.git]
/
rsaref
/
rsaref.c
diff --git
a/rsaref/rsaref.c
b/rsaref/rsaref.c
index 55cebc8fcb3c984c474d752b4cfde01db5aea62a..ae70feb3e9b0e246d07d0891ef0087cb34c96d61 100644
(file)
--- a/
rsaref/rsaref.c
+++ b/
rsaref/rsaref.c
@@
-279,7
+279,8
@@
int RSA_ref_public_encrypt(int len, unsigned char *from, unsigned char *to,
R_GetRandomBytesNeeded((unsigned int *)&i,&rnd);
while (i > 0)
{
- RAND_bytes(buf,16);
+ if (RAND_bytes(buf,16) <= 0)
+ goto err;
R_RandomUpdate(&rnd,buf,(unsigned int)((i>16)?16:i));
i-=16;
}