Yeah, technically the line "LIBSSH2_SESSION **session;" is actually "LIBSSH2_SESSION **session)" as in it's the last parameter to a function. The calling code passes in the address of a LIBSSH2_SESSION *.
John Engstrom
________________________________________
From: libssh2-devel [libssh2-devel-bounces_at_cool.haxx.se] On Behalf Of Maxime Larocque [maxmtl2002_at_yahoo.ca]
Sent: Monday, August 31, 2015 5:54 PM
To: libssh2-devel_at_cool.haxx.se
Subject: Re: OS X Crash in libssh2_session_startup() - EXC_BAD_ACCESS (code=1 address=0x0)
Hi,
Le 2015-08-31 18:19, Engstrom, John a écrit :
I have an application that is using libssh2 and when I call into libssh2_session_startup() I’m crashing. The calling code looks like this:
LIBSSH2_SESSION **session;
.
.
.
*session = libssh2_session_init_ex(ssh_alloc, ssh_free, ssh_realloc, name);
I don't know if you actually allocate the space for *session in the hidden code, but right now *session can point to anything. Otherwise, it should simply be a LIBSSH2_SESSION *...
Maxime
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-09-01