mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
fd9ae9ac04
Previously the local ABI string was written to an on-stack buffer and the pointer to that buffer was saved in a global before the function returned. This had two issues: c[ABI].val pointed to a no-longer-valid on-stack buffer after config_init returned, and the string could potentially be truncated. Fix both of those by changing pkg_get_myabi to return a pointer to a string allocated by asprintf. Note that the allocated string is left in the global config array until it is implicitly freed on process exit. Reported by: GCC 13 -Wdangling-pointer Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42623 |
||
---|---|---|
.. | ||
config.c | ||
config.h | ||
dns_utils.c | ||
dns_utils.h | ||
FreeBSD.conf.latest | ||
FreeBSD.conf.quarterly | ||
hash.c | ||
hash.h | ||
Makefile | ||
Makefile.depend | ||
pkg.7 | ||
pkg.c |