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.
This commit is contained in:
Sara Golemon 2005-03-26 05:31:31 +00:00
parent 0e0ed2aff4
commit d6039f39e4

View File

@ -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;