From nobody Thu Apr 16 15:56:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fxN1M0wWKz6Zt9B for ; Thu, 16 Apr 2026 15:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fxN1L5Db3z3NHp for ; Thu, 16 Apr 2026 15:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776355014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VTitpA+xJioxWYX7JNKN91nhvYg6b5J3eaZPZkTpKQw=; b=RB+EF64kLpwoSuUNPmeXAZp7KyUokUtFiQdNpL5tV2dt51c8eYRSFkNF/Gp/IEsIo8eT/k BNXrsdO4oHMHfOtnyXWcTdFR9uEyTi2bT5Vk/BAGU5JUH7V22kH7ha3dyXtdh/RGVjHjI8 eOpdhjaHcClewKMGam5AmcYqMLlyHoigflgxHeP/RuogX3LYLMWR5IHNxJp8TVbSPrkyzW o5mixJsKWPT483VX1ugXC67UzuIeb/8zSd3H61ZftAecb0FA1dOyjDs3PLPJ2x1LDKOEgQ OMIHL6rcqRfOp2fcU5CgokkZ7QATGSWzrQSd6E4b1oyzrAp8Y/70ZMS4i7lLIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776355014; a=rsa-sha256; cv=none; b=yjH1HDhdpRhyV3FUaOeMbVol6DRXOCFtpCjW+d+3cgfMSDWfUWK4HWh9MZs9jdmN+uWYC2 d/4iAdk4o80VwloyiGl08OcGPk6RqhE9YlW/qxqXjO+2BdjCgjMGvqeFeBlx0mnIPT9oC4 wl2b1qx5M8NEnxl50MrI3131CAtL0iUNzrzsEceXYJtRoGI7V9v0M1zsuAoq/fWre6zGco zvi6GXte94svN2vtETLUtcMk4wC9zmc9/WTdddCHeB3yMEs8TbVoUi4azRvsQuQliknobJ 19wT6WhaYn32PKmGwEVotUrykzvE13LPZk1KNkRbFacpXwNYY05Ix/NLd3zsPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776355014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VTitpA+xJioxWYX7JNKN91nhvYg6b5J3eaZPZkTpKQw=; b=QGHH3UtH22UExCIyCUapJH2xkiU1z52qpkkL5108uFebF23TPcEokVawIcRDsjvS4ijO+m aGSaDxaI9CqMrY6BL8u0T4uJwRJ0Yw7QDqi4UEvYAoZaqRIaRcwCI+w438JHDZTOBbh9uA Driq8Djhit5JqpWvCqgmkIfJDCa2RqdZf3a3xn1DfGQ+vN09Pe0SFKfHmVZ03Wct4fzHLN spcSUcmSP1jzxegshpHEEq4L06J3aBP9WAlYRkcht2DEBnCdz8Do4FlUNN/lqT5RhPLWfp MZ4oDYiAcBGDeHhF1sKO8ccSpXXFDr9rawNBHfy7XDZV32FcMXy9ZBRI7fif6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fxN1L3qbXz1CB4 for ; Thu, 16 Apr 2026 15:56:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2227b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 16 Apr 2026 15:56:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1379cde85f61 - stable/15 - imgact_elf: Unconditionally initialize a variable in a note handler List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1379cde85f6177fa457aec9bd7a100424a990a60 Auto-Submitted: auto-generated Date: Thu, 16 Apr 2026 15:56:49 +0000 Message-Id: <69e106c1.2227b.27d49071@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1379cde85f6177fa457aec9bd7a100424a990a60 commit 1379cde85f6177fa457aec9bd7a100424a990a60 Author: Mark Johnston AuthorDate: 2026-04-08 04:19:56 +0000 Commit: Mark Johnston CommitDate: 2026-04-16 15:56:26 +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 (cherry picked from commit 8a68c2509c00ae0dbeab64064bb600cfac787a73) --- sys/kern/imgact_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 7410efca4807..c91fd8089487 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2714,6 +2714,7 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) int structsize; p = arg; + structsize = sizeof(Elf_Auxinfo); if (sb == NULL) { size = 0; sb = sbuf_new(NULL, NULL, AT_COUNT * sizeof(Elf_Auxinfo), @@ -2727,7 +2728,6 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) sbuf_delete(sb); *sizep = size; } else { - structsize = sizeof(Elf_Auxinfo); sbuf_bcat(sb, &structsize, sizeof(structsize)); PHOLD(p); proc_getauxv(curthread, p, sb);