OpenSSH 2.9p2 bugs

Jean-Pierre chombier at mac.com
Thu Sep 27 21:33:07 EST 2001


Howdy,

 I've found two bugs in the OpenSSH 2.9p2 source code. I had
a look into the latest source-tree available at openssh.com,
and they seem still there:

-- 'incoming_stream' is used in place of 'outgoing_stream',
file compress.c, line 36:

void
buffer_compress_init_send(int level)
{
	if (compress_init_send_called == 1)
		deflateEnd(&incoming_stream); ****** should be &outgoing_stream
	compress_init_send_called = 1;
	debug("Enabling compression at level %d.", level);
	if (level < 1 || level > 9)
		fatal("Bad compression level %d.", level);
	deflateInit(&outgoing_stream, level);
}


-- 'called' is never set,
file packet.c, line 1325:

int
packet_set_maxsize(int s)
{
	static int called = 0;
	if (called) {
		log("packet_set_maxsize: called twice: old %d new %d",
		    max_packet_size, s);
		return -1;
	}
	if (s < 4 * 1024 || s > 1024 * 1024) {
		log("packet_set_maxsize: bad size %d", s);
		return -1;
	}
 ****** missing: called = 1;
	log("packet_set_maxsize: setting to %d", s);
	max_packet_size = s;
	return s;
}

cheers,

 - Jean-Pierre.



More information about the openssh-unix-dev mailing list