The header_interval/offset changes introduced a bug, doing sizeof
on a pointer where it should have been the array. So we didn't compare
the full md5, just the first sizeof(pointer) bytes.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
md5_update(&md5_ctx, p, hdr->len - sizeof(*hdr));
- if (memcmp(hdr->md5_digest, md5_ctx.hash, sizeof(md5_ctx.hash))) {
+ if (memcmp(hdr->md5_digest, md5_ctx.hash, sizeof(hash))) {
log_err("md5: verify failed at %llu/%u\n",
io_u->offset + header_num * hdr->len,
hdr->len);