From nobody Fri Nov 20 12:04:53 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 4jWDY127vGz71X3W for ; Fri, 20 Nov 2026 12:04:53 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jWDY10YwJz3QYd for ; Fri, 20 Nov 2026 12:04:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795176293; 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=ApANIOzeUGevcGU3cwm+P8ZRu27hReqlh9fkIvxFnXg=; b=BMucwJkAnp6XZbvmupBqLjvc9DDyoQVTEQz4DbwDt0v4tuocC5AKeQi72yKYN2ac+vJa/j p4FlsuL1tJAFRWI8YWSpXUXG5t4swcE/FDg5eNAc/+kdO9beLSkIb672/rzkDn6EWRS4e/ J4Ijn5KyPG6zCFVTCU+jBOBznrk8sfcIc5+bXG2pFNos5jyTGzBDx4zVSbhTqZZMU3VBg6 KW/Kas4j5qNVc3zvXhSlbeVir0716xOJLmJiA2XVJDvVx931iur7dfJIloeUabvoQ/kVo0 DN+93XtL5SNkbPgf8Mwg0rb65F5DwYSn9f/RwCWfM4cdycPNoglxk1u4j9kd1A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795176293; b=Jn3aN7MQW4gM16PeNchqbkjUpxuL+fvywOITUvvkYa/sDUSppMHKJwy0ntIzxC2+CLx8Hd Xxu+zHKUXjIkcCYaabCUecnVHavNtbktOJhV2e0vJtV5IW7lghxzBOmJvlE4KnmppXdZ8W jBCqgRVytkTnT1kY07+vZgAVpTPLgqXfVetd1mGb2jiE2v+ZfBcj3pqbTkGIpERUD5EUXM qBXararEHZnlSFhDrf/1akOWm3IIHyeO+fYpOV+GFS8GbfRL1S6W+YYQyEkyC/URBI2ziH njYvqyQqYkge9ZjYilzNwbm8fcdQo1HE9sXofHkxfxoX43fFdQAlbiTHOF3Mhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795176293; 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=ApANIOzeUGevcGU3cwm+P8ZRu27hReqlh9fkIvxFnXg=; b=OSUzw68YcEVq05EyyRuDIP9jX9eCSHYr+7L9j10sYgJJh4xI2QyemGkurWqsoc9j8sI7hp ET0AHGCYQ2I20c8oJEc++6Ve9gqHj4vH8Ssa1tT0GV9nK+oekXZGkUotKRbZVcggGPiMu8 FzF1d9J7t2xYc+GuV5L8L4kwEWCaUtW3hLQMiELSb4X908RiXEUtgJOcKmScCpNzi/aiGL g2mZp54g/kCC94RojjSIHZcCv3Ca5CIireWukKznw5FQrXKeAeZepmNcgYMk7S0ifTtsQ3 H8yZ8/Bf6OfpUJo3wuZuOHALMdwdczEd/fcF8gc1IqVaWP6+yelLxztIVf+nlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jWDY10BFJznRH for ; Fri, 20 Nov 2026 12:04:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 516e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 12:04:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 658c3d5376f6 - stable/14 - stdio: Fix error case for positional %wN / %wfN List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 658c3d5376f691604ae5f9ee8c8d788839b6c1fa Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 12:04:53 +0000 Message-Id: <6b003765.516e.388c5870@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=658c3d5376f691604ae5f9ee8c8d788839b6c1fa commit 658c3d5376f691604ae5f9ee8c8d788839b6c1fa Author: Dag-Erling Smørgrav AuthorDate: 2026-11-16 11:45:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-11-20 12:04:06 +0000 stdio: Fix error case for positional %wN / %wfN In the case were N was not a valid bit width, we were taking the wrong error path. Fixes: 5e809bf1c93f ("stdio: Fix positional %wN / %wfN conversion") (cherry picked from commit 0bf5d86620d047b4551d7414bf8011a328264b3d) --- lib/libc/stdio/printf-pos.c | 4 ++-- lib/libc/tests/stdio/snprintf_test.c | 2 ++ lib/libc/tests/stdio/swprintf_test.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdio/printf-pos.c b/lib/libc/stdio/printf-pos.c index 47fd30578e32..a4c59c6ac847 100644 --- a/lib/libc/stdio/printf-pos.c +++ b/lib/libc/stdio/printf-pos.c @@ -373,7 +373,7 @@ reswitch: switch (ch) { flags &= ~FASTINT; fmt--; } - goto error; + break; } goto rflag; case 'z': @@ -606,7 +606,7 @@ reswitch: switch (ch) { flags &= ~FASTINT; fmt--; } - goto error; + break; } goto rflag; case 'z': diff --git a/lib/libc/tests/stdio/snprintf_test.c b/lib/libc/tests/stdio/snprintf_test.c index b805f513c402..392fb43f9795 100644 --- a/lib/libc/tests/stdio/snprintf_test.c +++ b/lib/libc/tests/stdio/snprintf_test.c @@ -175,6 +175,7 @@ ATF_TC_BODY(snprintf_wN, tc) SNPRINTF_TEST(" 1", "%1$*2$w16d", (int16_t)1, 2); SNPRINTF_TEST(" 1", "%1$*2$w32d", (int32_t)1, 2); SNPRINTF_TEST(" 1", "%1$*2$w64d", (int64_t)1, 2); + SNPRINTF_TEST("42w42d", "%1$d%w42d", 42); } ATF_TC_WITHOUT_HEAD(snprintf_wfN); @@ -211,6 +212,7 @@ ATF_TC_BODY(snprintf_wfN, tc) SNPRINTF_TEST(" 1", "%1$*2$w16d", (int_fast16_t)1, 2); SNPRINTF_TEST(" 1", "%1$*2$w32d", (int_fast32_t)1, 2); SNPRINTF_TEST(" 1", "%1$*2$w64d", (int_fast64_t)1, 2); + SNPRINTF_TEST("42wf42d", "%1$d%wf42d", 42); } ATF_TP_ADD_TCS(tp) diff --git a/lib/libc/tests/stdio/swprintf_test.c b/lib/libc/tests/stdio/swprintf_test.c index 6f3d56657f4c..6a9e68c9d5fd 100644 --- a/lib/libc/tests/stdio/swprintf_test.c +++ b/lib/libc/tests/stdio/swprintf_test.c @@ -176,6 +176,7 @@ ATF_TC_BODY(swprintf_wN, tc) SWPRINTF_TEST(" 1", "%1$*2$w16d", (int16_t)1, 2); SWPRINTF_TEST(" 1", "%1$*2$w32d", (int32_t)1, 2); SWPRINTF_TEST(" 1", "%1$*2$w64d", (int64_t)1, 2); + SWPRINTF_TEST("42w42d", "%1$d%w42d", 42); } ATF_TC_WITHOUT_HEAD(swprintf_wfN); @@ -212,6 +213,7 @@ ATF_TC_BODY(swprintf_wfN, tc) SWPRINTF_TEST(" 1", "%1$*2$w16d", (int_fast16_t)1, 2); SWPRINTF_TEST(" 1", "%1$*2$w32d", (int_fast32_t)1, 2); SWPRINTF_TEST(" 1", "%1$*2$w64d", (int_fast64_t)1, 2); + SWPRINTF_TEST("42wf42d", "%1$d%wf42d", 42); } ATF_TP_ADD_TCS(tp)