]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libprocstat: make sv_name not static
authorBrooks Davis <brooks@FreeBSD.org>
Thu, 26 Oct 2023 20:38:41 +0000 (21:38 +0100)
committerBrooks Davis <brooks@FreeBSD.org>
Thu, 26 Oct 2023 20:38:41 +0000 (21:38 +0100)
commitefeba8da1d2da9d2c471936415cfad5f63daae76
treeb6767ee2dbdcd14279b48a0a12b1649ae55b81fc
parent9fcbd4c0d19cdbfa1fb4711c00c9c9cf84dbefb0
libprocstat: make sv_name not static

Making this variable static makes is_elf32_sysctl() and callers thread
unsafe.

Use a less absurd length for sv_name.  The longest name in the system is
"FreeBSD ELF64 V2" which tips the scales at 16+1 bytes.  We'll almost
certainly have other problems if we exceed 32 characters.

Reviewed by: markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D42199

(cherry picked from commit 72a4ee26a7c665ae1c31abe1c6feeaa7ccaba140)
lib/libprocstat/libprocstat.c