mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Fix another segfault on abrupt X connection shutdown. This should
have happened in rev 1.5 [r996] but didn't! Now we never call
sk_get_private_ptr() on a socket unless we've ensured it's non-NULL.
[originally from svn r3140]
[r996 == 7b0e082700
]
This commit is contained in:
parent
426dc87712
commit
c1d61052ae
6
x11fwd.c
6
x11fwd.c
@ -361,10 +361,10 @@ void x11_override_throttle(Socket s, int enable)
|
||||
*/
|
||||
int x11_send(Socket s, char *data, int len)
|
||||
{
|
||||
struct X11Private *pr = (struct X11Private *) sk_get_private_ptr(s);
|
||||
|
||||
if (s == NULL)
|
||||
struct X11Private *pr;
|
||||
if (!s)
|
||||
return 0;
|
||||
pr = (struct X11Private *) sk_get_private_ptr(s);
|
||||
|
||||
/*
|
||||
* Read the first packet.
|
||||
|
Loading…
Reference in New Issue
Block a user