HomeFreeBSD

pw: Don't return a pointer to an on-stack buffer from grp_set_passwd.

Description

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

Details

Provenance
jhbAuthored on Dec 5 2022, 12:28 AM
Reviewer
imp
Differential Revision
D37534: pw: Don't return a pointer to an on-stack buffer from grp_set_passwd.
Parents
rG0163de282e31: libsa: Disable -Wdangling-pointer for zfs.c.
Branches
Unknown
Tags
Unknown