From ea4daeb28ede9575ef70c49bab3d5cfb46fdd268 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 24 Oct 2024 23:26:19 +0200 Subject: [PATCH] cov: use 64bit arithmentic --- lib/device/dev-type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c index 805373480..ddbbc4f20 100644 --- a/lib/device/dev-type.c +++ b/lib/device/dev-type.c @@ -611,7 +611,7 @@ static int _has_gpt_partition_table(struct device *dev) sz_entry = le32_to_cpu(gpt_header.sz_part_entry); for (i = 0; i < nr_entries; i++) { - if (!dev_read_bytes(dev, entries_start + i * sz_entry, + if (!dev_read_bytes(dev, entries_start + (uint64_t)i * sz_entry, sizeof(gpt_part_entry), &gpt_part_entry)) return_0;