forwardings in SSH1. Was causing several MSG_SUCCESS to be queued up
unread, which was wrong-but-benign in most cases but caused a hard
crash with compression enabled (one of those uncompressed
MSG_SUCCESSes was fed to the zlib decompressor with spectacular
results).
git-svn-id: svn://svn.tartarus.org/sgt/putty@1609
cda61777-01e9-0310-a592-
d414129be87e
+ char type;
+ static char *e;
int n;
int sport,dport,sserv,dserv;
char sports[256], dports[256], host[256];
int n;
int sport,dport,sserv,dserv;
char sports[256], dports[256], host[256];
PKT_STR, host,
PKT_INT, dport,
PKT_END);
PKT_STR, host,
PKT_INT, dport,
PKT_END);
+ do {
+ crReturnV;
+ } while (!ispkt);
+ if (pktin.type != SSH1_SMSG_SUCCESS
+ && pktin.type != SSH1_SMSG_FAILURE) {
+ bombout(("Protocol confusion"));
+ crReturnV;
+ } else if (pktin.type == SSH1_SMSG_FAILURE) {
+ c_write_str("Server refused port forwarding\r\n");
+ ssh_editing = ssh_echoing = 1;
+ }
+ logevent("Remote port forwarding enabled");