Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Apr 2026 14:04:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 292811] sys/kern/imgact_elf.c:2722:18: error: variable 'structsize' is uninitialized when passed as a const pointer argument here
Message-ID:  <bug-292811-227-nbSLOY53fE@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-292811-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292811

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

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

commit 8a68c2509c00ae0dbeab64064bb600cfac787a73
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-04-08 04:19:56 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-04-08 14:04:29 +0000

    imgact_elf: Unconditionally initialize a variable in a note handler

    In the sb == NULL case, we are computing the size of the note using a
    dummy sbuf drain handler which counts bytes and discards the contents of
    the buffer, so the fact that "structsize" is uninitialized doesn't
    matter.  But, the compiler may complain about this, so we might as well
    just initialize it unconditionally to silence the warning, as other
    handlers already do.

    PR:             292811
    MFC after:      1 week

 sys/kern/imgact_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-292811-227-nbSLOY53fE>