diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-03-30 14:55:47 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-03-30 14:57:36 +0200 |
commit | db1c50c090bad72eb5c28b1867b7564708ba7f3c (patch) | |
tree | 02fcbe0780de8702a92efbd484b12319a8ac9e00 /ustream-polarssl.c | |
parent | 16bf6f0f4b3bee60540af9b289d55faee2a3f86e (diff) | |
download | ustream-ssl-db1c50c090bad72eb5c28b1867b7564708ba7f3c.tar.gz |
polarssl: fix return code of entropy function
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'ustream-polarssl.c')
-rw-r--r-- | ustream-polarssl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ustream-polarssl.c b/ustream-polarssl.c index e5c8455..cbf24cb 100644 --- a/ustream-polarssl.c +++ b/ustream-polarssl.c @@ -79,7 +79,9 @@ static bool urandom_init(void) static int _urandom(void *ctx, unsigned char *out, size_t len) { - read(urandom_fd, out, len); + if (read(urandom_fd, out, len) < 0) + return POLARSSL_ERR_ENTROPY_SOURCE_FAILED; + return 0; } |