svn commit: samba r23284 - in branches/SAMBA_3_0/source/nsswitch: .

Michael Adam ma at sernet.de
Fri Jun 1 15:10:44 GMT 2007


On Thu, May 31, 2007 at 08:45:52PM -0700, Jeremy Allison wrote:
> On Thu, May 31, 2007 at 11:58:57PM +0000, obnox at samba.org wrote:
> > Author: obnox
> > Date: 2007-05-31 23:58:56 +0000 (Thu, 31 May 2007)
> > New Revision: 23284
> > 
> > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23284
> > 
> > Log:
> > Oh what a nasty typo! This gave me some headache,
> > with talloc randomly failing.
> > 
> > Hey, shouldn't TALLOC_ARRAY _not_ return NULL when
> > requested to allocate an array with zero entries? :-)
> 
> Yes it should at the moment. It should be calling
> _talloc_array_zeronull() under the covers in lib/util.c
> which explicitly does this.

Jeremy, note my subtle use of double negation. :-)
I just wanted to warm up the old topic... Sorry for annoying you. ;)

> Was this not happening for you ? I'd like you to
> debug that as I can't see a codepath for this not
> to happen.

It _did_ return NULL. This triggered a NT_STATUS_NO_MEMORY
since due to the typo fixed in r23284 cited above
it ran into the talloc_array part when it should not
(count being zero).

So everything is fine, I guess?!

Cheers, Michael

-- 
Michael Adam <ma at sernet.de>
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: Info @ SerNet.DE


More information about the samba-technical mailing list