From nobody Sat Nov 30 16:51:18 2024 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 4Y0wzq1B58z5fHy9; Sat, 30 Nov 2024 16:51:19 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0wzp6BX1z4nWk; Sat, 30 Nov 2024 16:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985478; 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=HFCApEesDyYUo24U709JN61no4jtvtQpc2/eVehIAuA=; b=U+yIKeihEa3xzHrwamh4p1EC59if8S9nnfY5QiqDAPblW3HdbWj/appBGEshbcAV2Jh602 Y2/2UKvRWiAVZ8DYZYuLBj90UlX91pdaGcSh1fWnoWR+njvmH9oz9oJhpyfQjsCoKFcwJU JvX1nI2SWh+cr7FdSHl6TQOO8TwEbE6xKRM9LTMNVKqhKD3kYnzGSp12K1eWYjBnJ4RoXt 6Ybr5fJSP0V475JZMrGFto9ouuTh4o+hc3vwU0ySipqiiJxMyAQY0/MXLzE/9rG/F2V0z7 s1kHpUpzer/aubvDWE9SUugQgnN+fxouynrwB6E/RaEPFBxlYVVPEzNQXYPrNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985478; 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=HFCApEesDyYUo24U709JN61no4jtvtQpc2/eVehIAuA=; b=UCRKZ0Q0Lc0kKiqt6VjWJQ5lzJHyCRjvbqRd4RwgtVwkBw3iUNFbp8yi7wmiEx8ZPNTNdh 2tPH6g+ClaBphPJA11C8QbhboclW+srWhqQYwPSjX45pkXYNu1t3yvYw8cJUZ4kxWM8UFc 0yLhIHmEe0MKEdy3f6tjnVQU1JTC3hpmK0Osojj2wrijg5gn2nJ1bZ4FMPW7YQ3oPUrcVA shGarA4Lj2IsGINiGmCTt4+QqaH4OIYtdfnNQkdjk9DrPfnKfngMUTZAYUWPQiHSjPPZVT qdfq6h2al97A3osSG/DBMrqtjQw2H+oykNtzEjedCKsd5CcMvnFjHmxf/URe+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985478; a=rsa-sha256; cv=none; b=S6DID88xgZXuhzErz40+7kekfcumwLHBPz+UAbT/iWI6+umjggcgW7/kDkVMhnOf52nF6X QJiO/rDxESehrLoZlb/isGWObh3DRb9Bcs89LMBPZV8ranaRu5gtIya4qxK8DLhBggqxy8 yF7yozRAXDIboLPomjh6uq17vtmQMn89F5BnXhB0R7j8GLf/AoGX0zGICurKssqtqnPd8a TshH3yyMd5oLjOI3PNsIAdtY8MVg92H0zXF8/CaJb3yR4DQ6wAZohCDHMQd5Xb574LL3Jz 95mtw4vE2PBXbA35N3x60Z7XbgV1GlWQDFVzq4wqyJWdIXnLyiqAKtHWiEUXmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y0wzp4wrCzGKx; Sat, 30 Nov 2024 16:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpIWt043854; Sat, 30 Nov 2024 16:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpIKS043851; Sat, 30 Nov 2024 16:51:18 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:18 GMT Message-Id: <202411301651.4AUGpIKS043851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0c293d0425a7 - stable/14 - md5: Consistently use item count as the first argument to calloc 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c293d0425a7d87e367c77ced644b2f1150afd7d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0c293d0425a7d87e367c77ced644b2f1150afd7d commit 0c293d0425a7d87e367c77ced644b2f1150afd7d Author: John Baldwin AuthorDate: 2024-07-19 17:04:27 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 md5: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D46009 (cherry picked from commit e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9) --- sbin/md5/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 1bf897d119c0..b8afa736e229 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -593,7 +593,7 @@ main(int argc, char *argv[]) while (argc--) gnu_check(*argv++); argc = 0; - argv = calloc(sizeof(char *), numrecs + 1); + argv = calloc(numrecs + 1, sizeof(char *)); for (rec = head; rec != NULL; rec = rec->next) { argv[argc] = rec->filename; argc++;