[krbdev.mit.edu #2786] dead code in init_common() causes malloc(0)
Ken Raeburn
raeburn at MIT.EDU
Fri Dec 3 21:19:03 EST 2004
I don't think the code is doing anything actually invalid according to
the C-1990 spec (which we're assuming compliance to). It allows
malloc(0) calls (returning either NULL or a unique pointer), and memcpy
shouldn't be reading or storing anything if the length is zero.
Nevertheless, if it's always a null pointer and zero length, it is kind
of silly for us to have those calls there.
Ken
More information about the krb5-bugs
mailing list