coverity - a->a_nvals may be NULL

This commit is contained in:
Howard Chu 2007-09-26 20:26:03 +00:00
parent c428a16332
commit 9fd4a8582a

View 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));
}