Date: Wed, 29 May 2024 14:39:11 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 5360d017be83 - main - loader: Fix G overflowing for G(4) on 32-bit builds Message-ID: <202405291439.44TEdBI9097826@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5360d017be83d2502ba262f391ef45b07e0de680 commit 5360d017be83d2502ba262f391ef45b07e0de680 Author: Ahmad Khalifa <ahmadkhalifa570@gmail.com> AuthorDate: 2024-05-29 14:30:59 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-29 14:37:17 +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 --- 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 3f2d1c6c20b0..a0aea9823632 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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405291439.44TEdBI9097826>