]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Sebastian Kuschel reports that pfd_closing can be called for a socket
authorSimon Tatham <anakin@pobox.com>
Thu, 15 Aug 2013 06:42:36 +0000 (06:42 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 15 Aug 2013 06:42:36 +0000 (06:42 +0000)
commit883641845fae43821e6362a234d531b22d01cdd9
tree7a99e7db23733c7705f409026a9b64974114b659
parent4ae1e260eac7ef0b9d4b444543c33d1467a7a81b
Sebastian Kuschel reports that pfd_closing can be called for a socket
error with pr->c NULL, in which case calling sshfwd_unclean_close on
it will dereference NULL and segfault. Write an alternative error
handling path for that possibility.

(I don't know if it's the only way, but one way this can happen is if
you're doing dynamic forwarding and the socket error occurs during
SOCKS negotiation, in which case no SSH channel has been set up yet
because we haven't yet found out what we want to put in the
direct-tcpip channel open message.)

[originally from svn r10018]
portfwd.c