mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Fix potential segfault in port forwarding code
[originally from svn r1184]
This commit is contained in:
parent
686740c2fb
commit
f0d968ce49
@ -248,8 +248,6 @@ void pfd_close(Socket s)
|
||||
*/
|
||||
void pfd_send(Socket s, char *data, int len)
|
||||
{
|
||||
struct PFwdPrivate *pr = (struct PFwdPrivate *) sk_get_private_ptr(s);
|
||||
|
||||
if (s == NULL)
|
||||
return;
|
||||
|
||||
@ -259,11 +257,12 @@ void pfd_send(Socket s, char *data, int len)
|
||||
|
||||
void pfd_confirm(Socket s)
|
||||
{
|
||||
struct PFwdPrivate *pr = (struct PFwdPrivate *) sk_get_private_ptr(s);
|
||||
struct PFwdPrivate *pr;
|
||||
|
||||
if (s == NULL)
|
||||
return;
|
||||
|
||||
pr = (struct PFwdPrivate *) sk_get_private_ptr(s);
|
||||
pr->ready = 1;
|
||||
sk_set_frozen(s, 0);
|
||||
sk_write(s, NULL, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user