]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libprocstat: make sv_name not static
authorBrooks Davis <brooks@FreeBSD.org>
Mon, 16 Oct 2023 16:53:11 +0000 (17:53 +0100)
committerBrooks Davis <brooks@FreeBSD.org>
Mon, 16 Oct 2023 16:58:37 +0000 (17:58 +0100)
commit72a4ee26a7c665ae1c31abe1c6feeaa7ccaba140
tree484e530b3e66c082e0e3ea22d4d3b5d146e4cc90
parent9735cc0e41825bb9e95d16433d381ffe4c190f38
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
lib/libprocstat/libprocstat.c