linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850]
authorGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Tue, 1 Feb 2022 22:39:02 +0000 (22:39 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 3 Feb 2022 11:04:08 +0000 (11:04 +0000)
commit97ba273b505763325efd802dc3a9562dbba79579
tree148ab8fc7676a92e9415672d3ec436bc5861fb44
parenta9d35765728cbc5b66af5eeda5428298bccf9b69
linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850]

Pass the actual number of bytes returned by the kernel.

Fixes: 33099d72e41c ("linux: Simplify get_nprocs")
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
sysdeps/unix/sysv/linux/getsysstats.c