]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Add missing bracket in EGD seeding code.
authorDarren Tucker <dtucker@dtucker.net>
Sat, 6 Jul 2019 02:00:41 +0000 (12:00 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Sat, 6 Jul 2019 02:06:48 +0000 (12:06 +1000)
When configured --with-prngd-socket the code had a missing bracket after
an API change.  Fix that and a couple of warnings.  bz#3032 , from
ole.weidner at protonmail.ch

entropy.c

index 31a7f1c3ef5460aa911831cab74dae16c9595329..5c6594ac9d2de2a226537c1525b7900882438df0 100644 (file)
--- a/entropy.c
+++ b/entropy.c
@@ -201,14 +201,15 @@ rexec_send_rng_seed(struct sshbuf *m)
 void
 rexec_recv_rng_seed(struct sshbuf *m)
 {
-       u_char *buf = NULL;
+       const u_char *buf = NULL;
        size_t len = 0;
        int r;
 
-       if ((r = sshbuf_get_string_direct(m, &buf, &len)) != 0
+       if ((r = sshbuf_get_string_direct(m, &buf, &len)) != 0)
                fatal("%s: buffer error: %s", __func__, ssh_err(r));
 
-       debug3("rexec_recv_rng_seed: seeding rng with %u bytes", len);
+       debug3("rexec_recv_rng_seed: seeding rng with %lu bytes",
+           (unsigned long)len);
        RAND_add(buf, len, len);
 }
 #endif /* OPENSSL_PRNG_ONLY */