ITS#8199 fix NULL ptr dereference in at_next

Deleting all values of olcAttributeTypes and then adding a value with
index > 0 triggers a NULL dereference when config_generic tries to
append to a list that doesn't exist yet.

Already fixed for olcObjectClasses in ITS#5388.
This commit is contained in:
Ryan Tandy 2015-07-17 15:46:32 -07:00 committed by Ryan Tandy
parent e75fbc953f
commit b48d0169d0

View file

@ -365,6 +365,10 @@ at_next( AttributeType **at )
}
#endif
if ( *at == NULL ) {
return 0;
}
*at = LDAP_STAILQ_NEXT(*at,sat_next);
return (*at != NULL);