From d6039f39e4ae5eff208b16b6b9ab154f89c6a3d4 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Sat, 26 Mar 2005 05:31:31 +0000 Subject: [PATCH] Nix the memset loop Speaking of which: Why wasn't it JUST a memset() call? The encrypted version of packet_write fills in this data with OpenSSL RAND_bytes() data, and as far as the unencrypted version goes? Well, it's unencrypted, randomness doesn't help at that point. --- src/packet.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/packet.c b/src/packet.c index 7613f4a..e090c21 100644 --- a/src/packet.c +++ b/src/packet.c @@ -893,11 +893,6 @@ int libssh2_packet_write(LIBSSH2_SESSION *session, unsigned char *data, unsigned libssh2_htonu32(buf, packet_length); buf[4] = padding_length; - for (i = 0; i < padding_length; i++) { - /* Make random */ - buf[5 + i] = '\0'; - } - if (session->state & LIBSSH2_STATE_NEWKEYS) { /* Encryption is in effect */ unsigned char *encbuf, *s;