Commit 72e08e2a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix a VSM segment list corruption bug, spotted by inspection.

parent 9c9ce2a6
......@@ -181,7 +181,7 @@ VSM_Alloc(unsigned size, const char *class, const char *type, const char *ident)
/* Mark as inconsistent while we write string fields */
seq = vsm_mark();
if (size < sha->len) {
if (size + sizeof (*sha) < sha->len) {
sha2 = (void*)((uintptr_t)sha + size);
memset(sha2, 0, sizeof *sha2);
......
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