mån 2011-08-15 klockan 22:48 +0200 skrev Daniel Stenberg:
> On Mon, 15 Aug 2011, Arvid Picciani wrote:
> 
> >> Reworked patch attached.
> >
> > Nice work
> 
> Yes, I agree. I'd like to release 1.2.9 first though as a pure bugfix release 
> and then merge Henrik's work into mainline and work towards a 1.3.0.

Regarding bugfixes you may want to merge 


Avoid reuse after free when closing X11 channels 
https://github.com/hno/libssh2/commit/fa02d23111821a3e2949c6c7f646e064f3b71e1f


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

Make libssh_keepalive_send a blocking call to avoid corrupting the
transport if the socket becomes saturated while sending the
keep-alive.
https://github.com/hno/libssh2/commit/21ffe0c2ba64dc98a67c635d0c903a93064b015e

the latter still do not handle non-blocking mode well due to buffers
being stack allocated, and there is similar non-blocking issues at a
couple of other places:

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

Regards
Henrik
commit fa02d23111821a3e2949c6c7f646e064f3b71e1f
Author: Henrik Nordstrom <hen...@henriknordstrom.net>
Date:   Sat Aug 6 13:43:11 2011 +0200

    Avoid reuse after free when closing X11 channels

diff --git a/example/x11.c b/example/x11.c
index 650d0b4..05e316f 100644
--- a/example/x11.c
+++ b/example/x11.c
@@ -408,14 +408,16 @@ main (int argc, char *argv[])
             current_node = NULL;
 
         while (current_node != NULL) {
+            struct chan_X11_list *next_node;
             rc = x11_send_receive(current_node->chan, current_node->sock);
+            next_node = current_node->next;
             if (rc == -1){
                 shutdown(current_node->sock,SHUT_RDWR);
                 close(current_node->sock);
                 remove_node(current_node);
-
             }
-            current_node = current_node->next;
+
+            current_node = next_node;
         }
 
 
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to