git: 43dc900d75a6 - stable/14 - loader: Fix G overflowing for G(4) on 32-bit builds
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 26 Mar 2025 01:29:03 UTC
The branch stable/14 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=43dc900d75a6262408f566dbaca27400ee5a9990
commit 43dc900d75a6262408f566dbaca27400ee5a9990
Author: Ahmad Khalifa <ahmadkhalifa570@gmail.com>
AuthorDate: 2024-05-29 14:30:59 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-03-26 01:28:38 +0000
loader: Fix G overflowing for G(4) on 32-bit builds
Prevent G(4) and over from overflowing for 32-bit builds.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
(cherry picked from commit 5360d017be83d2502ba262f391ef45b07e0de680)
---
stand/efi/loader/copy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c
index b6dd7c51c921..d34acea4e876 100644
--- a/stand/efi/loader/copy.c
+++ b/stand/efi/loader/copy.c
@@ -36,7 +36,7 @@
#include "loader_efi.h"
#define M(x) ((x) * 1024 * 1024)
-#define G(x) (1UL * (x) * 1024 * 1024 * 1024)
+#define G(x) (1ULL * (x) * 1024 * 1024 * 1024)
#if defined(__amd64__)
#include <machine/cpufunc.h>