From nobody Tue Sep 22 07:32:11 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 4hpsHb4kYfz6tGrL for ; Tue, 22 Sep 2026 07:32:11 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hpsHb4J8jz4TM6 for ; Tue, 22 Sep 2026 07:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790062331; 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=W0H2+UgrnPOMdiK2qFNsEah8SMQ3JM1ZTJBUfo+/nb8=; b=dm4Ny+D3VR9QfDMgTA1CiRmc+PrwZf0lWmARtyHFjpKmIZzTWlFRgvA6qumlYq70RXlapk ptk0kcLMRM4Uq6m9QJ9B5Kyjdja2SuXLpE+gWAgTne3yk5sAv1sufDbBf6dJ9Gf+k5801z xHFUCE2Qbzfunq5ih1lXRz0spbXqTOaX/mYTiC2WqjHoVuJBZ1jPtHiz8Q/i7dV/lbL1Xf naQpw77I0IDgm4BZy8pioHUPwy6ODV/vwFoW/R4jFhvlCkEv9iFaKXX3P1vU6eLLutBM+F bzUM6TtU2klDY/W7JjWC6zMnUFyPieLli9gCPY6JfTAC7qS8q8qJIgqVxvC52Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790062331; b=JosR4NqJhObwTxYCpUrg7vBFxLYcRaWg960LVuD8XCMWKsqCn4aA8oo+Aq9yJAt6pAPgXw +U8v4kZ0BWAkapHJUZEmZngLjmrhCaSb9CEWUG/y3wLYnrkcJZfvzn20Nf8LYggdSg+MMi R4jRpqf/IIjIxlf1mJdqkFTkje0rq2tbvDd9WWDf+d1+2VKiwMAdYyVMgu8gQYGlQcmPBn saZN1s16Vb1+oUVS2LO+p9tZwW40sT3CTEI6T8pi31U2k5YOF7YYoL5dJ4zi3h8S1fWk9h U388nJ68gNlBeHOivo9eJMH9rceaOiDjhkkvh0bOOBJRhAxfg6rTg6H5XsGD6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790062331; 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=W0H2+UgrnPOMdiK2qFNsEah8SMQ3JM1ZTJBUfo+/nb8=; b=G6Yfher0Vtx5qEG6gxeDDWGlCxRc40BTmpmCKcYINHVLaMwPWOiCLwTp+UP1jjSB8p4Ac+ OFWr0w4SBjFH6F8mCB2QOGbOnu1EvaeV3MayqYxSLYVsDh2o9hjC16MW/PxJ8ss2MMLndL +5hSPzK0hqmisU4EzT3j+W7EAI6E+arhyL5Uk6AxqzBRmvO85u4Kd6Hsvp/I32pTcId4m0 yU5J6HQvXl82kmi2Rfd8OlIxCDcTmrk8fJJN0yDqSrT5qxK+95NWs3RTx7IYZYlMmnMR64 Us2iPv7rIbKj9SC/iZjwQh0/Oa2DGleWPyyiewyLMgjYa0DDgbFcNgoEMpB5MA== 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 4hpsHb3N2Yzxl6 for ; Tue, 22 Sep 2026 07:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22500 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 22 Sep 2026 07:32:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrey V. Elsukov Subject: git: 9b4b68e82739 - stable/14 - ipfw: fix gcc warning List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: 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: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b4b68e82739e7f5e0ea337abffd0cadcb9abc8b Auto-Submitted: auto-generated Date: Tue, 22 Sep 2026 07:32:11 +0000 Message-Id: <6ab22efb.22500.2cd557e8@gitrepo.freebsd.org> The branch stable/14 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=9b4b68e82739e7f5e0ea337abffd0cadcb9abc8b commit 9b4b68e82739e7f5e0ea337abffd0cadcb9abc8b Author: Andrey V. Elsukov AuthorDate: 2026-09-22 07:21:52 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-09-22 07:21:52 +0000 ipfw: fix gcc warning We use first loop only for possible needed realloc, so it is not required to restrict end condition. Also check realloc() return value before accessing. This is direct commit to stable/14. Reported by: dim Differential Revision: https://reviews.freebsd.org/D56616 --- sbin/ipfw/ipfw2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index a8a70dccf125..99a94a1b9d1d 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -5883,12 +5883,12 @@ ipfw_detect_u32_kbi(void) need = sizeof(ipfw_obj_lheader) + (64 * sizeof(ipfw_sopt_info)); opver = 0; - for (i = 4; i >= 0; i--) { + for (i = 5; i > 0; i--) { hdr = realloc(hdr, need); - memset(hdr, 0, need); if (hdr == NULL) break; + memset(hdr, 0, need); hdr->opheader.opcode = IP_FW_DUMP_SOPTCODES; hdr->opheader.version = opver; hdr->size = need;