Subject: Re: [patch] fix X11 forwarding example reuse after free

Re: [patch] fix X11 forwarding example reuse after free

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 16 Aug 2011 10:36:06 +0200 (CEST)

On Tue, 16 Aug 2011, Henrik Nordström wrote:

> Avoid reuse after free when closing X11 channels

Merged!

> And perhaps this keepalive fix as well, but is is not yet complete

I'm a bit curious about that fix. The comment here:

+ /* Skip sending keep-alive if already blocking trying to send something
*/
+ if ((dir & LIBSSH2_SESSION_BLOCK_OUTBOUND)) {
+ rc = libssh2_keepalive_send (session, &seconds_to_next);

Isn't the comment saying the exact opposite of what the code does?
LIBSSH2_SESSION_BLOCK_OUTBOUND is set as direction if that was the one that
was "blocked" and couldn't be fulfilled. Alas, when sending of data couldn't
be completed this code will try to send the keepalive packet.

Or am I wrong?

> Add FIXME markers where _libssh2_transport_send is used badly
> https://github.com/hno/libssh2/commit/b64b1813158c16e0506ec96fbc89d134d82d330e

This patch seems to rely on the previous keepalive change so I didn't merge it
yet.

I did however also merge your document fixes as you will see!

Thanks a lot!

-- 
  / daniel.haxx.se

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-08-16