]> git.sur5r.net Git - openldap/commitdiff
don't allow NULL values (because of parsing errors; ITS#5090)
authorPierangelo Masarati <ando@openldap.org>
Mon, 13 Aug 2007 19:33:01 +0000 (19:33 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 13 Aug 2007 19:33:01 +0000 (19:33 +0000)
servers/slapd/entry.c

index 213b9f129cc88fa33084d82d3555e23d308ceb39..660bcb676b7ba680b3b2aa6f7cb28b2a1e63f914 100644 (file)
@@ -310,6 +310,14 @@ str2entry2( char *s, int checkvals )
                        if ( i == lines ) break;
                }
 
+               if ( BER_BVISNULL( &vals[i] ) ) {
+                       Debug( LDAP_DEBUG_ANY,
+                               "str2entry: attributeType %s #%d: "
+                               "no value\n", 
+                               ad->ad_cname.bv_val, attr_cnt, 0 );
+                       goto fail;
+               }
+
                if( slapMode & SLAP_TOOL_MODE ) {
                        struct berval pval;
                        slap_syntax_validate_func *validate =