Possible bug in 3.2.7

Jeremy Allison jra at samba.org
Fri Jan 16 19:53:26 GMT 2009

On Fri, Jan 16, 2009 at 08:41:27PM +0100, Remy Zandwijk wrote:
>>> Since after the if-block, we can't be sure the memory is still 
>>> allocated. And since  'servername' is used further down the code...
>> You're thinking C++, not C. In C it's guarenteed to still be there.
> Well, I have to admit, I am not a coder. A colleque of mine however pointed me to:
> 	http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf
> Specificaly 6.2.1 point 2, 6.2.4 point 2 and 6.2.4 point 5.

That doesn't describe any language I'm familiar with (what
is the "restrict" keyword ? :-). But if this is where things
are going, it might be better to move it. Lots of existing code
will break if this is strictly enforced.

> Did you check the other places were sizeof() is (possibly wronly) being used?

Yes. I didn't find any others. I'm presuming the given patch fixes the
bug for you ?


More information about the samba-technical mailing list