projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f77fab
)
Fixed the return code of RAND_query_egd_bytes when connect fails.
author
ganesh
<ganeshbhambarkar@gmail.com>
Wed, 9 Nov 2016 15:14:22 +0000
(20:44 +0530)
committer
Richard Levitte
<levitte@openssl.org>
Tue, 24 Jan 2017 13:39:20 +0000
(14:39 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1886)
crypto/rand/rand_egd.c
patch
|
blob
|
history
diff --git
a/crypto/rand/rand_egd.c
b/crypto/rand/rand_egd.c
index fb6bad70dc8a9cfd34dc808a08739f330fe49ca1..5fb230fa95d7888a7b24fdcc9901f9156ba4b5c3 100644
(file)
--- a/
crypto/rand/rand_egd.c
+++ b/
crypto/rand/rand_egd.c
@@
-133,6
+133,7
@@
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
break;
# endif
default:
+ ret = -1;
goto err; /* failure */
}
}
@@
-230,9
+231,7
@@
int RAND_egd_bytes(const char *path, int bytes)
int num, ret = 0;
num = RAND_query_egd_bytes(path, NULL, bytes);
- if (num < 1)
- goto err;
- if (RAND_status() == 1)
+ if (num < 1 || RAND_status() == 1)
ret = num;
err:
return (ret);