From nobody Mon Oct 16 16:59:20 2023 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 4S8Ncm5zXtz4xZZ7; Mon, 16 Oct 2023 16:59:20 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S8Ncm3mQfz3Sc9; Mon, 16 Oct 2023 16:59:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697475560; 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=TOeIGQYARU0c5dofrUVzVzob7CvSosjmHvBgtnsA0c0=; b=Ay//xu9whsmfWaIq7NHE4vWp62xNbZnfVlRHyv1JKfR1eZ6HertoZ/uOrSjXn9mshaDW2s zkq2HvLqHTG2rCc5Z7JjeB0nwGcSXuN4bJyZvmebE9P3GKzLBJtQIu5/5+2yhIj0odZmZx iqcr0K9qxlmUZkQljvmSfua633zPT1wnzN36lvFXDcOwxcEcn4WFv21A2mX3AuUo1qHvYL uAzYDmyrsKrHi0mo9Z8XT7iqxeGC9fqMlIp1+JIg5vd5Qi2csS9rZqinR/ff/scH9JGZPr X81VBS3IC+Z6RAjmRwv4EcTV3N36Rq6atXCwNwKHhgVtA7z8MK1uVglt+fPdIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697475560; a=rsa-sha256; cv=none; b=leDk9KbCjf0z1gfVBgvB1jhBk/3XLCLGDA1dwmWRlFLhe+yLqwV6O4PaVZouqmGf5b1ieF +RMJ3noU7Xs0dveQs74pMRK31BZfo5Fut8ysmBsRIASK4Fb7mksRxVjP+fTjSCehrJFNCz UW9GRDzRM0M+1KoqF1VCpx4tD+FZplVrpBQ7SqaF9wUldNhAXRmf2rZS4bTk2CRBR+hCfY M9ijeKaFyDVKF+aB5PdkM9TGTqRNswj+Qv8xYv60V8PiPyO6QApBFIlUqfQoOywAJnPZP5 3bE6zjQPaKkMAyQq1VSj5DM+jTu4PgN677ZLXSElEti97tGMLdpT77Wyj1QlTA== 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=1697475560; 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=TOeIGQYARU0c5dofrUVzVzob7CvSosjmHvBgtnsA0c0=; b=mc8FX9162IfUkNTGFK+1uOEKmKLOZgslMMphk7frRlUfk4EFxyYLFCmYKSJ66L/ufLSLJy 6YE+Zf5mAN4aNouhoLZAKxZk+tltGgTy7NVtnkwkUgnZRG1C62mSCzMhr3m5nILr+QmkFE RGlYbONJLrB/b/NafkX7UOQleNfKozKjNoX2j4n+EPCZxcnhH56VM5BTLvi2+AVdeRCKK0 XfPX06uj97AfVMS/W8j97mOiclZo3dRSA5rY60xcWbBcgPSXnhNMJ5coDfiJaSznIeqyA+ XGfluNO3ghZ3EIpWyVCaz4wvQYr+Gvb2jIDWGMh9dFeKFG4wzzJfVSRvRKwixQ== 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 4S8Ncm2tNVzpDD; Mon, 16 Oct 2023 16:59:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39GGxKOn028914; Mon, 16 Oct 2023 16:59:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39GGxK01028911; Mon, 16 Oct 2023 16:59:20 GMT (envelope-from git) Date: Mon, 16 Oct 2023 16:59:20 GMT Message-Id: <202310161659.39GGxK01028911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8f06fabe39ac - main - libprocstat: copy all the 32-bit auxv entries 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f06fabe39ac3ebca4ab448a456945008305a23f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8f06fabe39ac3ebca4ab448a456945008305a23f commit 8f06fabe39ac3ebca4ab448a456945008305a23f Author: Brooks Davis AuthorDate: 2023-10-16 16:53:22 +0000 Commit: Brooks Davis CommitDate: 2023-10-16 16:58:43 +0000 libprocstat: copy all the 32-bit auxv entries Use source struct size not the destination struct size so we copy all the auxv entries, not just the first half of them. Fix a style issue on an adjacent line. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42200 --- lib/libprocstat/libprocstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 84502bb895b7..031294387ca7 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2434,8 +2434,8 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) warn("sysctl: kern.proc.auxv: %d: %d", pid, errno); goto out; } - count = len / sizeof(Elf_Auxinfo); - auxv = malloc(count * sizeof(Elf_Auxinfo)); + count = len / sizeof(Elf32_Auxinfo); + auxv = malloc(count * sizeof(Elf_Auxinfo)); if (auxv == NULL) { warn("malloc(%zu)", count * sizeof(Elf_Auxinfo)); goto out;