Skip to content
Snippets Groups Projects
Commit 3469fafd authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

Fix entry_alloc with no attrs

parent dfe5c1e7
No related branches found
No related tags found
No related merge requests found
......@@ -177,8 +177,12 @@ static Entry * mdb_entry_alloc(
nvals * sizeof(struct berval), op->o_tmpmemctx );
BER_BVZERO(&e->e_bv);
e->e_private = e;
e->e_attrs = (Attribute *)(e+1);
e->e_attrs->a_vals = (struct berval *)(e->e_attrs+nattrs);
if (nattrs) {
e->e_attrs = (Attribute *)(e+1);
e->e_attrs->a_vals = (struct berval *)(e->e_attrs+nattrs);
} else {
e->e_attrs = NULL;
}
return e;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment