=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -r1.99 -r1.100 --- src/usr.bin/ssh/ssh.c 2001/03/01 02:29:04 1.99 +++ src/usr.bin/ssh/ssh.c 2001/03/01 22:46:37 1.100 @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.99 2001/03/01 02:29:04 deraadt Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.100 2001/03/01 22:46:37 markus Exp $"); #include #include @@ -918,7 +918,8 @@ id = packet_get_int(); len = buffer_len(&command); - len = MAX(len, 900); + if (len > 900) + len = 900; packet_done(); if (type == SSH2_MSG_CHANNEL_FAILURE) fatal("Request for subsystem '%.*s' failed on channel %d", @@ -991,7 +992,7 @@ debug("Sending command: %.*s", len, buffer_ptr(&command)); channel_request_start(id, "exec", 0); } - packet_put_string(buffer_ptr(&command), len); + packet_put_string(buffer_ptr(&command), buffer_len(&command)); packet_send(); } else { channel_request(id, "shell", 0);