From nobody Wed Apr 8 14:04:38 2026 X-Original-To: dev-commits-src-main@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 4frPvV5FZlz6YBXn for ; Wed, 08 Apr 2026 14:04:38 +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 4frPvV41Yrz3mRj for ; Wed, 08 Apr 2026 14:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775657078; 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=1ww6bml46Frc44Pa2FtYzsgJ59Ku7spgMv5K1IuYH18=; b=CafydVDD/dKijxcD+Fo5WxoaQeBMDvrqc1DdsFYpXy6ECx1dDDKzzYHHrToosA7sK8Pw1V AqcTFSYSJRf4PIFIy4UFUX9Z5Ok+vXctUaP8lwXllw4g73IJffPGTWChxHagJoSfNsqGwh Gboh+yIsUcMLBV0dOxMh0pdZK974LHC4j6Xu1tUw2KbTaZ363X12d8ngTXniDn1EZdsd06 4+N6TcQy6IzGlfoNg83PRd7/llII0I/YGqKbXbWCixyRnSiPIqTtsK6OgPJLqEUnzINtHI UmXLf5YPgtOUd2+0zX7ggCcXf6iR1QL03q3oiY5WGnQW19A5DUBbeEuIGd2hGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775657078; a=rsa-sha256; cv=none; b=r31VPcHofeuPLmsSVG6ayoHgNunDFPrSIE/wIbToeyDQWp8b8rf1584tSdYvbJSU+FU+ty r36c0E1yA4B6iSz6YoLczQRTEbfxO5doAg0bRpA7ZkpK4Zm7XAly9Z0fuUPj8BN5cJSWbC lUn2F6gefgQ7DO5qSSldT1BPnPqVAunCqkq1KafTqBREx2ZFW8gG15SE7c8LZ5D9XIDk59 XYb2dHCiz8VXBiLwZIBXrkCMBPlPYv8ZUU6KePlNAYWbgi+U2Sm6BnnG1ia7otzm2G0rkP JeCsSMdFcwSxcAjBidFflKp4DyIz1veLNtbF1diQJ5k8pAW0WbQXS1brhRgMjw== 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=1775657078; 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=1ww6bml46Frc44Pa2FtYzsgJ59Ku7spgMv5K1IuYH18=; b=n1tiFyqRA7+U7E4tgVKc2tqf3UiFM0WMwAWsyZYVgt0IXQsySm0R8gvVFuWJ4JlWXfSqZh cI9+LsKlOvMI34j6ffb0WTBNypklkQR3mON3Shq6yFVs3r0w6sgtQ33/hfyXKRnv4C0p2U sP3qDWrAoC3dxdgm0aPe284aUtY1V0ofZL55P1eCmYwftRn/P5WEL96HRgu3GYHcIkZ9U0 STJ3rBMd0iM0TPWWmHeHqXwm+SXRsuo8E7jIpkyY4PukoR63NJM4p7vYePe3XoLKvyDyOb wew3osgcRbzIAVOjcWUaY3y779Wv5LU5E6ZWUlgpIrM3E1DIiyOqkZB11Rc0dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4frPvV3d7kzDWf for ; Wed, 08 Apr 2026 14:04:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bc1f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 08 Apr 2026 14:04:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8a68c2509c00 - main - imgact_elf: Unconditionally initialize a variable in a note handler List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 8a68c2509c00ae0dbeab64064bb600cfac787a73 Auto-Submitted: auto-generated Date: Wed, 08 Apr 2026 14:04:38 +0000 Message-Id: <69d66076.3bc1f.750efd30@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8a68c2509c00ae0dbeab64064bb600cfac787a73 commit 8a68c2509c00ae0dbeab64064bb600cfac787a73 Author: Mark Johnston AuthorDate: 2026-04-08 04:19:56 +0000 Commit: Mark Johnston 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(-) 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);