We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 08c58c9 + 778fa52 commit 12de1cbCopy full SHA for 12de1cb
lib/randombytes/random/random.c
@@ -13,6 +13,7 @@ int randombytes(unsigned char *p, int len) {
13
while (completed < len) {
14
ssize_t result = read(source, p + completed, len - completed);
15
if (result < 0) {
16
+ close(source);
17
return ED25519_ERROR;
18
}
19
completed += result;
lib/randombytes/urandom/urandom.c
@@ -9,9 +9,12 @@ int randombytes(unsigned char *p, int len) {
9
} else {
10
ssize_t result = read(source, p, len);
11
12
return ED25519_ERROR; /* something went wrong */
+
return ED25519_SUCCESS;
20
0 commit comments