]> git.sur5r.net Git - openldap/commitdiff
Fix entry_decode
authorHoward Chu <hyc@openldap.org>
Wed, 2 Jan 2002 11:52:06 +0000 (11:52 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 2 Jan 2002 11:52:06 +0000 (11:52 +0000)
servers/slapd/entry.c

index 08c5fd728d80f40218bee8bb88af6677ecf1aab7..7b076196935c64853b54f2dd509043baca7cfdb4 100644 (file)
@@ -626,7 +626,6 @@ int entry_decode(struct berval *bv, Entry **e)
                bptr = (BVarray)(a+1);
                a->a_vals = bptr;
                j = entry_getlen(&ptr);
-               a->a_vals[j].bv_val = NULL;
 
                while (j) {
                        i = entry_getlen(&ptr);
@@ -636,6 +635,9 @@ int entry_decode(struct berval *bv, Entry **e)
                        bptr++;
                        j--;
                }
+               bptr->bv_val = NULL;
+               bptr->bv_len = 0;
+               bptr++;
        }
        if (a)
                a->a_next = NULL;