On Fri, 27 Mar 2009, Jean-Louis CHARTON wrote:

> The requested diff.

+    method_buf = LIBSSH2_ALLOC(session, 7);  /* ssh-dss. */
+    if (method_buf == NULL) {
+       goto __alloc_error;
+    }

...

+
+    memcpy(method_buf, "ssh-dss", 7);
+    *method         = method_buf;

Why alloc for 7 bytes? Why alloc for 7 *fixed* bytes?

-- 

  / daniel.haxx.se

------------------------------------------------------------------------------
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to