Wed, 25, 2006 at 08:20:54PM +1000, tridge (AT) samba (DOT) org wrote:
In my attempt to be humorous I left off the obvious exception -
anything that could be an allocation failure obviously does need to be
checked. It's not K to segv on allocation failure (or failing to
mmap, failing to open a file etc etc). So I think we do need one check
when we allocate a new attribute, but if the attribute does get added
K then we don't need to check the case that its null afterwards.
I was not talking about ldb, I was talking about generated
NDR marshalling code. In ndr_echo.c starting with line 1162
we have the following code fragment:
ndr_print_echo_Enum1(ndr, "foo1", *r->in.foo1);
ndr->depth--;
ndr_print_ptr(ndr, "foo2", r->in.foo2);
ndr->depth++;
ndr_print_echo_Enum2(ndr, "foo2", r->in.foo2);
ndr->depth--;
ndr_print_ptr(ndr, "foo3", r->in.foo3);
ndr->depth++;
if (r->in.foo1 == NULL) return;
I think the last line is bogus, as in the first line we
already segfaulted. should I mark these as wontfix in
coverity?
Volker