[krbdev.mit.edu #6777] Segmentation fault in krb library (sn2princ.c) if realm not resolved
Tom Yu via RT
rt-comment at krbdev.mit.edu
Fri Sep 17 15:30:47 EDT 2010
"Greg Hudson via RT" <rt-comment at krbdev.mit.edu> writes:
> [tlyu - Fri Sep 17 14:46:43 2010]:
>> Perhaps strdup() on AIX can return NULL for a zero-length string? For
>> that matter, does malloc() on AIX return NULL for a zero argument?
>
> I don't think it's fruitful to speculate, only to step through in a
> debugger.
>
> (krb5int_build_principal_va() would not invoke malloc(0) if the realm is
> empty. It would invoke strdup("") but a lot more software would break on
> AIX if it's strdup were so broken as to return NULL in that case.)
Actually krb5_build_principal_va() in krb5-1.6.x (the krb5int_ version
is newer than 1.6) does execute malloc(rlen) and check it for NULL.
More information about the krb5-bugs
mailing list