Fix dump buffering, do not write uninitialized memory to the end K/V blocks on serialize

This commit is contained in:
Vitaliy Filippov
2025-11-29 16:34:34 +03:00
parent 67ba9f9b7c
commit 59e6527303
2 changed files with 50 additions and 38 deletions
+4
View File
@@ -389,6 +389,10 @@ bool kv_block_t::serialize(uint8_t *buf, int size)
return false;
blk->items++;
}
if (pos < size)
{
memset(buf+pos, 0, size-pos);
}
return true;
}