From: Ryan Tandy Date: Fri, 17 Jul 2015 22:46:32 +0000 (-0700) Subject: ITS#8199 fix NULL ptr dereference in at_next X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=326849fd6797ed2c6b0ef69a919fbae9c409e4ff;p=openldap 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. --- diff --git a/servers/slapd/at.c b/servers/slapd/at.c index c4d65cfd61..d361d91df5 100644 --- a/servers/slapd/at.c +++ b/servers/slapd/at.c @@ -365,6 +365,10 @@ at_next( AttributeType **at ) } #endif + if ( *at == NULL ) { + return 0; + } + *at = LDAP_STAILQ_NEXT(*at,sat_next); return (*at != NULL);