verify: fix potential overflow before widen
[fio.git] / verify.c
index 3e0294435b3e393fc08c0f8260c133eab7c111df..b438eed6bd3d8af954b754a55fb57c054b79e7f2 100644 (file)
--- a/verify.c
+++ b/verify.c
@@ -344,7 +344,7 @@ static void log_verify_failure(struct verify_header *hdr, struct vcont *vc)
        offset = vc->io_u->verify_offset;
        if (td->o.verify != VERIFY_PATTERN_NO_HDR) {
                len = hdr->len;
-               offset += vc->hdr_num * len;
+               offset += (unsigned long long) vc->hdr_num * len;
        } else {
                len = vc->io_u->buflen;
        }