]> git.sur5r.net Git - openldap/commitdiff
coverity - a->a_nvals may be NULL
authorHoward Chu <hyc@openldap.org>
Wed, 26 Sep 2007 20:26:03 +0000 (20:26 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 26 Sep 2007 20:26:03 +0000 (20:26 +0000)
servers/slapd/value.c

index 64d7298dde912a25ca01855cfad3a813151de93c..0aecdb3293f0b2d54a318807d2804321995cc6ba 100644 (file)
@@ -737,7 +737,7 @@ ordered_value_add(
        }
        if ( anum ) {
                AC_MEMCPY( new, a->a_vals, anum * sizeof(struct berval));
-               if ( nnew )
+               if ( nnew && a->a_nvals )
                        AC_MEMCPY( nnew, a->a_nvals, anum * sizeof(struct berval));
        }