[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] crash with callbacks


On Wednesday 03 December 2014 12:30:38 Yanis Kurganov wrote:
> I got a libssh crash (((((
> 0.6.3 as well as master
> 
> Imagine following situation:
> Init session #1...
> Do something in session #1...
> Init session #2...
> Destroy session #1...
> Do something in session #2... crash!
> 
> The reason is
> LIBSSH_THREAD void *ssh_log_userdata;
> in
> libssh\src\log.c
> stores a pointer to OLD (destroyed) session #1
> 
> My patch fixes this. Example code also attached.
> Feel free to make more suitable fixes =)

You are using the lecacy code for setting a log callback. Please migrate to 
the new API:

ssh_set_log_callback();

and

ssh_set_log_userdata();



	-- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


Follow-Ups:
Re: [PATCH] crash with callbacksYanis Kurganov <yanis.kurganov@xxxxxxxxx>
References:
[PATCH] crash with callbacksYanis Kurganov <YKurganov@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org