[Bug 204945] usr.sbin/acpi/acpidump/acpi.c:729: code relies on undefined behaviour ?

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 26 Feb 2025 05:28:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204945

--- Comment #3 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=8c108dccd7f878ad44aaef1f5bfb5622666bd09a

commit 8c108dccd7f878ad44aaef1f5bfb5622666bd09a
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-02-26 05:24:30 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-02-26 05:27:32 +0000

    acpidump: do not use pointer arithmetic to check for overflow

    Pointer arithmetic overflow is UB.  Convert to unsigned uintptr_t and do
    the check there.

    PR:     204945
    Reported by:    David Binderman <dcb314@hotmail.com>
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week

 usr.sbin/acpi/acpidump/acpi.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.