svn rev #23376: trunk/src/include/
Greg Hudson
ghudson at MIT.EDU
Mon Nov 30 07:38:11 EST 2009
On Mon, 2009-11-30 at 00:25 -0500, Ken Raeburn wrote:
> This is not the only change recently that assumes that malloc and
> friends will never return NULL in a success case; k5-int.h:k5alloc
> makes that assumption too. Are you assuming that the krb5 code will
> never make a call requesting zero bytes? (Or asserting that it
> shouldn't and any such cases are bugs; or actually checking the call
> sites?) Or is this just an oversight?
In general I am happy to assume that krb5 code will never need to
allocate zero bytes. This might be foolish, but I have yet to see a
counterexample.
As long as it holds, it's a useful simplifying assumption. In
particular, I think we might start seeing spurious Coverity defects if
we start hedging the (ptr == NULL) checks.
More information about the krbdev
mailing list