From 7c79db20e3e8667a26be691e5bcb7d5fb1737e27 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 14 Mar 2026 22:50:06 +0000 Subject: util/nvmutil: fix potential overflow in rw off is signed, so converting that to unsigned is better than converting rc (unsigned) to signed. i had the right idea, but got it wrong in the earlier version. this should fix potential overflow issues. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/nvmutil') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 9218b827..ee17b2f7 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1894,7 +1894,7 @@ rw_file_exact(int fd, u8 *mem, size_t nrw, rv = prw(fd, mem + (size_t)rc, nrw - (size_t)rc, - off + (off_t)rc, + (size_t)off + rc, rw_type, loop_eagain, loop_eintr, OFF_ERR); -- cgit v1.2.1