In library/adldap.c:_adcli_ldap_have_in_mod(), there are two alloca calls:
vals = alloca (sizeof (struct berval) * (count + 1));
pvals = alloca (sizeof (struct berval *) * (count + 1));
Array allocation with alloca is problematic because that can lead to stack overflows. In this particular case, it seems to be harmless because count is always 1 (if I traced the callers correctly), but it still serves as a bad example.
Created attachment 120279 [details] [review]
Replace alloca() by malloc() for arrays
Please consider the attached patch as a fix for the ticket.
Attachment 120279 [details] pushed as a69a898 - Replace alloca() by malloc() for arrays
Looks good. Merged with a couple whitespace fixes. Function names should
be followed by a space.