diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-12-10 23:18:48 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-12-10 23:18:48 +0800 |
commit | 5d60e5f312ed1f47fe27618bf3d4310f4012a876 (patch) | |
tree | c04848d353bc7d7b1480c961e0c60155a91901c1 | |
parent | 38d7da5fe568deb4bd05f883edb646be91ad4f78 (diff) |
Use buf_eatstring instead
-rw-r--r-- | cli-session.c | 4 | ||||
-rw-r--r-- | svr-tcpfwd.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/cli-session.c b/cli-session.c index 5f5800e..699286d 100644 --- a/cli-session.c +++ b/cli-session.c @@ -408,11 +408,9 @@ void cleantext(char* dirtytext) { } static void recv_msg_global_request_cli(void) { - unsigned int len = 0; unsigned int wantreply = 0; - len = buf_getint(ses.payload); - buf_incrpos(ses.payload, len); + buf_eatstring(ses.payload); wantreply = buf_getbool(ses.payload); TRACE(("recv_msg_global_request_cli: want_reply: %u", wantreply)); diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c index 11b9222..c3746bf 100644 --- a/svr-tcpfwd.c +++ b/svr-tcpfwd.c @@ -39,13 +39,11 @@ /* This is better than SSH_MSG_UNIMPLEMENTED */ void recv_msg_global_request_remotetcp() { - unsigned int len = 0; unsigned int wantreply = 0; TRACE(("recv_msg_global_request_remotetcp: remote tcp forwarding not compiled in")) - len = buf_getint(ses.payload); - buf_incrpos(ses.payload, len); + buf_eatstring(ses.payload); wantreply = buf_getbool(ses.payload); if (wantreply) { send_msg_request_failure(); |