Commit 3880333f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Pål Hermunn Johansen

Zero overflow VSM allocations.

Submitted by:	Pål Hermunn Johansen
parent d681aeb9
......@@ -233,10 +233,11 @@ VSM_common_alloc(struct vsm_sc *sc, ssize_t size,
if (vr == NULL) {
/*
* No space in VSM, return malloc'd space
* This space will not be visible via the VSM
*/
ALLOC_OBJ(vr, VSM_RANGE_MAGIC);
AN(vr);
vr->ptr = malloc(size);
vr->ptr = calloc(size, 1);
AN(vr->ptr);
vr->len = size;
VTAILQ_INSERT_TAIL(&sc->r_bogus, vr, list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment