PuTTY bug cmdline-nc-garbage

This is a mirror. Follow this link to find the primary PuTTY web site.

Home | FAQ | Feedback | Licence | Updates | Mirrors | Keys | Links | Team
Download: Stable · Snapshot | Docs | Changes | Wishlist

summary: -nc on the command line mangles the host name
class: bug: This is clearly an actual problem we want fixed.
difficulty: fun: Just needs tuits, and not many of them.
present-in: r7683
fixed-in: r7685 be8818b4bcf3a802850c99ee68731a9a8663c94b 2007-08-08 (0.61)

From the original report:

I just have a quick bug report and patch for you.  I wasn't having any
success getting plink to work as a local proxy for putty, so I tried plink
verbosely on the command line.  The troublesome output was something like:

> plink host1 -v -nc host2:22
Access granted
Opening direct-tcpip channel to host2####:22 in place of session
Server refused to open a direct-tcpip channel
FATAL ERROR: Server refused to open a direct-tcpip channel

... where "####" was a bunch of garbage characters.  It turns out that after
the strncpy to ssh_nc_host, a '\0' is being written at the end of the entire
array, rather than at the end of the hostname.  A simple patch is attached,
against putty SVN r7683.
Audit trail for this bug.

If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2016-12-27 11:40:21 +0000)