Subject: Re: RE : For the interested ones : libssh2_userauth_publickey_fromfile andlibssh2_userauth_hostbased_fromfile with no need of the publickey file

Re: RE : For the interested ones : libssh2_userauth_publickey_fromfile andlibssh2_userauth_hostbased_fromfile with no need of the publickey file

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 27 Mar 2009 12:47:09 +0100 (CET)

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_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-03-27