From nobody Thu Oct 26 17:37:36 2023 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 4SGY0J4QLZz4y5Jj; Thu, 26 Oct 2023 17:37:36 +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 4SGY0J3xSjz4ZqQ; Thu, 26 Oct 2023 17:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341856; 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=O0D7yc17cAmU54B5DFFb0m3hZxzN3o3S6AqtUkh7fhQ=; b=FMSDfT+YZjmdTiw1V317IuU5nMWMDm/k8TngPwBcWUYgHOebYhIcjg/TcqUkk+QZllVzcy 0mv6dohIsYhhTUnZljgqFDc61KXCsj2cf9dsQgD1hvz/eJxuzaziJiBYT6M9sq74PPbud0 M3Fx2UnaKlm/D+PP6dSVKk3EImbdXiTPu2U06g4figI6DLFqft80sxRUvadBkfggSWQaz/ PtyYQRWN23dbZiCvfmvSyMSC7f22nuHCXKfW3QqLCsGG1JTdNMCBvh3wXRFcm0/yQR8vni lwuHCa7+8FqPWtLkpoVs16FD4iNIRwF7azrX2UxW1f2wpIt/1Ljn4rik6H6u8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341856; 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=O0D7yc17cAmU54B5DFFb0m3hZxzN3o3S6AqtUkh7fhQ=; b=U6xF2Rrlzn9E83+BOn3ssTC6s8hVOtLzhth1l3AqgOwm9K5sEZ6R1jClPtO1hH6e6TWPW2 /VbW4EJx1IJmhRfqcDokLzLEXOIEPS+atb71BA1fNins40FdVWAOlfgAO23kJqk3XtycER Xx8XvIWR20ft1Xl6W5i1VaY91TG0+vftvMSnTkX0T9CZKB9iHbZXbnZXII0sW2F/eIuCpb r742lBgy9gKYDACHf/gZyXVRB55x3lncWkl5/wzjp8KHfJQ1hdatFLqiYs0QxXH8nKddJ5 yQjY80k7hmfGhkpgsTxUjx0r2YvDhwvO/PW6d7Ie2r2NYHbSx0pPKyWCjztQkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698341856; a=rsa-sha256; cv=none; b=kmeaa853T++z5SlEOG5ZXWiOuRI2pMfwUBXOyWB/zjT6ZLfJqdTnLQrU5/yaz5c6sdJPyT 64riU28xA0RGyIF6+YdB+k2Ee5DdRhHGdykvvXOcoD6UyQ4ns92jSKvOYbkdxYtuhodreN cGu/yoDndE5TsR66sirleaZ4pRtRBVXjHsEopB0bBjOGMQdgJFnAaU9LHefFXcQaq9DA5R f63XQHyeWp/tmZ+U5U6DluZ7nWK2/naASV9zQBdLXLg64OIsZR+1TyYtShs6Yeb/ubDcV7 Wqqc5GwMspId++kCceF9Bppn1shdMglQ2aHNJiFkSI0sJ5roJBI+CEZS6c9IUA== 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 4SGY0J2xxWzglv; Thu, 26 Oct 2023 17:37:36 +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 39QHbaaq089809; Thu, 26 Oct 2023 17:37:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QHbabT089806; Thu, 26 Oct 2023 17:37:36 GMT (envelope-from git) Date: Thu, 26 Oct 2023 17:37:36 GMT Message-Id: <202310261737.39QHbabT089806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: ff90744045e3 - stable/14 - libprocstat: copy all the 32-bit auxv entries 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: ff90744045e310acae79669c07f70f0ecb5fbc0a Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ff90744045e310acae79669c07f70f0ecb5fbc0a commit ff90744045e310acae79669c07f70f0ecb5fbc0a Author: Brooks Davis AuthorDate: 2023-10-16 16:53:22 +0000 Commit: Brooks Davis CommitDate: 2023-10-25 23:30:56 +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 (cherry picked from commit 8f06fabe39ac3ebca4ab448a456945008305a23f) --- 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;