gensec: Fix a memory corruption in gensec_use_kerberos_mechs

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Feb 9 23:34:46 MST 2012


On Fri, Feb 10, 2012 at 01:25:31PM +1100, Andrew Bartlett wrote:
> Thanks for finding this!  
> 
> In this case it wasn't intentional that there ever be more output
> mechanisms than were input to the filter, so I would like to propose an
> alternate approach. 
> 
> I've attached a proposed patch, but unfortunately (and oddly) I've been
> unable to reproduce the original issue under valgrind.  Can you
> double-check it for me?

That is the approach I had initially done. But because it
changes the core logic of the function I opted for the *2
solution that Michael Adam proposed. There must have be a
reason why spnego is added every time we go through the
loop, and I did not understand that reason. Your patch also
fixes the valgrind error, but we get less output than with
my patch.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list