From nobody Wed Oct 28 05:52:36 2026 X-Original-To: dev-commits-src-branches@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 4jDxN53XXqz6wrRr for ; Wed, 28 Oct 2026 05:52:37 +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 4jDxN46wryz4LTg for ; Wed, 28 Oct 2026 05:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793166757; 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=SfmvSq01TlZgjMAKL9d3DU/UjZUS5WZ+6COfi4cEu/8=; b=S7rwQxH25NBt4t2KokPn46Snq/IYKpRNHIe1oymY+fPsluMXOsFXKBnNy6qIolfX2mTLtx +x/TEPFUtrGrYHOvPodG9ORPlmK/07oYuNadYJjjmIAzg+VBejugTzsvDLJ+reLs1ZPykT npbJP1zqOnrwc93cQ6yM/vTO+gg0IwM2MsHL0YxH6ydFA4dv0G6YRt9JPjHcPPEGY5J/m/ HEk8HygM8uurOT+/VT6sStfvdrcDfHvI+7QlelFgEMr0pvfn3Qtx7zQgVU4AXw9GNRM6VU ZQUvFmOHpR2Abh0zB8aZYBK2v+qxN45Xx8fzQF7ByWiHBFOZllpnhBH/EhDICg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793166757; b=Wco4zrql0f/FHkAU061S3/sMUkb5/v7oNTRLAJxMej1Zki1+bhyZOc64rVV6TasD+B4ULv E8bVhvF1tvIHwVGsu6vbi0zGeZIVq3IUgx0dgsi/lxylGkCLkxNQPM+Wzsb+rER5xRC09e YV0dZynEb+AB5oNxZea0HXXNV2hPNRCBiv6NrfuWECm+m7RT0w7QikTUvj5fXaeTFkV1pJ BPHV1POcDoT7h7szqEDlqXPTPoS+O3tXjYCL3wtw33HQB7YE+GjFfKTtfP8PttM2ZCaCpu uitc+zeL8zCnyhKKXzGSQlI+owc43gMvhElCuEmqeKtRrtXLbShRsBCCVRiswg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793166757; 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=SfmvSq01TlZgjMAKL9d3DU/UjZUS5WZ+6COfi4cEu/8=; b=dR4LOeUAMLmus/kbCYNOSvYrB0Ia6fXjMWwazrKZYnQ/KsIb43JWutY3xrLKmwprG5bkOs e2iQNK/nVPcCrriP6N15yXEbVMoztNX77gCZmi5FEhYzNQteTd6TotXR7MUNZkwJVkw8dq hTQ6TxzXsDq5oAKrrUizdUcq7lyHXSUDrY5Qu5039XXn4M9L83PlzvzcR96Uk/zB/8wK66 TIozZlYrNvl+ws9BaGWst4lK5lkcgrSRITefz3SIpzuxCC2MH5Yt6s7KmF4MOaNxhLYkQJ Zo6e4/iqTrNakGmMAToiw9s0NBtBJxbMwsvEr034GHWvjGehKt0qdRup+G8D8w== 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 4jDxN46Cy9zwHl for ; Wed, 28 Oct 2026 05:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36d3d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 28 Oct 2026 05:52:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: fedfb4a7fd1e - stable/15 - mkimg: Don't ignore invalid partition offsets List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fedfb4a7fd1e725dead64116100741c26e7e0243 Auto-Submitted: auto-generated Date: Wed, 28 Oct 2026 05:52:36 +0000 Message-Id: <6ae18da4.36d3d.6ec1886e@gitrepo.freebsd.org> The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fedfb4a7fd1e725dead64116100741c26e7e0243 commit fedfb4a7fd1e725dead64116100741c26e7e0243 Author: Colin Percival AuthorDate: 2026-10-06 21:22:07 +0000 Commit: Colin Percival CommitDate: 2026-10-28 01:13:01 +0000 mkimg: Don't ignore invalid partition offsets When handling PART_KIND_FILE, the "error" variable is set to reflect any errors in parsing the specified offset; but that value is then overwritten by the return value of image_copyin. Error out immediately instead. Note that it is not necessary to change the code in PART_KIND_SIZE which parses the size, since in that case we do not overwrite the value in "error". Fixes: 8f3c71c85e5f ("mkimg: Add support for offset if the source is an image") MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D60422 (cherry picked from commit e7f84fe6cfac2de3471e4912b1ac82023976ccfa) --- usr.bin/mkimg/mkimg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c index 39117f5f5379..a1881b114b7f 100644 --- a/usr.bin/mkimg/mkimg.c +++ b/usr.bin/mkimg/mkimg.c @@ -531,7 +531,7 @@ mkimg(void) else offset++; if (expand_number(offset, &byteoffset) == -1) - error = errno; + err(EX_IOERR, "partition %d", part->index + 1); } /* Work out exactly where the partition starts. */