projects
/
project
/
ustream-ssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
polarssl: fix return code of entropy function
[project/ustream-ssl.git]
/
ustream-polarssl.c
diff --git
a/ustream-polarssl.c
b/ustream-polarssl.c
index
e5c8455
..
cbf24cb
100644
(file)
--- 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;
}