projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Work around Travis "virtual memory exhausted" error
[openssl.git]
/
crypto
/
rand
/
rand_egd.c
diff --git
a/crypto/rand/rand_egd.c
b/crypto/rand/rand_egd.c
index f4bfd8696c1543b361e9e51c226203c32466910c..dd58b214981efd3d1d4fbf4e0f537e9da2a69959 100644
(file)
--- a/
crypto/rand/rand_egd.c
+++ b/
crypto/rand/rand_egd.c
@@
-48,7
+48,7
@@
NON_EMPTY_TRANSLATION_UNIT
* the number of bytes requested or smaller, if the EGD pool is
* drained and the daemon signals that the pool is empty.
*
* the number of bytes requested or smaller, if the EGD pool is
* drained and the daemon signals that the pool is empty.
*
- * RAND_egd(path) will query 255 bytes and use the bytes retr
ei
ved to seed
+ * RAND_egd(path) will query 255 bytes and use the bytes retr
ie
ved to seed
* the PRNG.
* RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
*/
* the PRNG.
* RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
*/
@@
-133,6
+133,7
@@
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
break;
# endif
default:
break;
# endif
default:
+ ret = -1;
goto err; /* failure */
}
}
goto err; /* failure */
}
}
@@
-227,10
+228,10
@@
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
int RAND_egd_bytes(const char *path, int bytes)
{
int RAND_egd_bytes(const char *path, int bytes)
{
- int num, ret =
0
;
+ int num, ret =
-1
;
num = RAND_query_egd_bytes(path, NULL, bytes);
num = RAND_query_egd_bytes(path, NULL, bytes);
- if (num <
1
)
+ if (num <
0
)
goto err;
if (RAND_status() == 1)
ret = num;
goto err;
if (RAND_status() == 1)
ret = num;