From b48d0169d04824f83c0e0855eea4d6429740cf08 Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Fri, 17 Jul 2015 15:46:32 -0700 Subject: [PATCH] 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. --- servers/slapd/at.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.5