]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pw: Don't return a pointer to an on-stack buffer from grp_set_passwd.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 5 Dec 2022 00:28:22 +0000 (16:28 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 5 Dec 2022 00:28:22 +0000 (16:28 -0800)
commit1055bedbed42dc176468b45b4f167a752ed8868f
treebfdfcb8473d14ef23e58bd8f27bc75d52fd63092
parent0163de282e3195a1845f75b486adb3e1e7580199
pw: Don't return a pointer to an on-stack buffer from grp_set_passwd.

Make 'line' static to move it to .bss instead as that pattern is used
elsewhere in pw(8) (e.g. the static buffer in pw_pwcrypt).

Reported by: GCC -Wdangling-pointer
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D37534
usr.sbin/pw/pw_group.c