mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
Merging in the changes from 0.41-0.43 main Dropbear tree
--HG-- extra : convert_revision : 4c3428781bc8faf0fd7cadd7099fbd7f4ea386e7
This commit is contained in:
5
random.c
5
random.c
@@ -60,7 +60,7 @@ static void readrand(unsigned char* buf, unsigned int buflen) {
|
||||
|
||||
#ifdef DROPBEAR_DEV_URANDOM
|
||||
readfd = open(DEV_URANDOM, O_RDONLY);
|
||||
if (!readfd) {
|
||||
if (readfd < 0) {
|
||||
dropbear_exit("couldn't open random device");
|
||||
}
|
||||
#endif
|
||||
@@ -71,7 +71,8 @@ static void readrand(unsigned char* buf, unsigned int buflen) {
|
||||
strlcpy(egdsock.sun_path, DROPBEAR_EGD_SOCKET,
|
||||
sizeof(egdsock.sun_path));
|
||||
|
||||
if ((readfd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||
readfd = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||
if (readfd < 0) {
|
||||
dropbear_exit("couldn't open random device");
|
||||
}
|
||||
/* todo - try various common locations */
|
||||
|
||||
Reference in New Issue
Block a user