]> git.sur5r.net Git - openldap/commitdiff
ITS#2865 from HEAD
authorHoward Chu <hyc@openldap.org>
Sat, 20 Dec 2003 15:07:31 +0000 (15:07 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 20 Dec 2003 15:07:31 +0000 (15:07 +0000)
servers/slapd/entry.c

index fdd5a18444cdd2109feb21d8966f3362be486a0b..87791c98500dabb94b56d7656bf5b6195214696f 100644 (file)
@@ -557,6 +557,16 @@ int entry_decode(struct berval *bv, Entry **e)
        BerVarray bptr;
 
        i = entry_getlen(&ptr);
+       if (!i) {
+#ifdef NEW_LOGGING
+               LDAP_LOG( OPERATION, INFO, 
+                       "entry_decode: entry length was zero\n", 0, 0, 0);
+#else
+               Debug( LDAP_DEBUG_ANY,
+                       "entry_decode: entry length was zero\n", 0, 0, 0);
+#endif
+               return LDAP_OTHER;
+       }
        x = ch_calloc(1, i);
        i = entry_getlen(&ptr);
        x->e_name.bv_val = ptr;