From: Howard Chu Date: Wed, 19 Dec 2012 17:15:09 +0000 (-0800) Subject: ITS#7477 check for invalid LDIF X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2565e974b9d11ef0939f9a034683e530558b3dee;p=openldap ITS#7477 check for invalid LDIF --- diff --git a/libraries/libldap/ldifutil.c b/libraries/libldap/ldifutil.c index 4bee36ea7e..449b5ab963 100644 --- a/libraries/libldap/ldifutil.c +++ b/libraries/libldap/ldifutil.c @@ -356,6 +356,13 @@ short_input: /* Make sure all attributes with multiple values are contiguous */ for (; ilr_lines; i++) { for (j=i+1; jlr_lines; j++) { + if ( !lr->lr_btype[j].bv_val ) { + fprintf( stderr, + _("%s: missing attributeDescription (line %d, entry \"%s\")\n"), + errstr, linenum+j, dn ); + rc = LDAP_PARAM_ERROR; + goto leave; + } if ( BV_CASEMATCH( lr->lr_btype+i, lr->lr_btype+j )) { nmods--; /* out of order, move intervening attributes down */