[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] crash with callbacks
[Thread Prev] | [Thread Next]
- Subject: Re: [PATCH] crash with callbacks
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 05 Dec 2014 11:27:59 +0100
- To: libssh@xxxxxxxxxx
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
Re: [PATCH] crash with callbacks | Yanis Kurganov <yanis.kurganov@xxxxxxxxx> |
[PATCH] crash with callbacks | Yanis Kurganov <YKurganov@xxxxxxxxxxxxxx> |