selinux/policycoreutils/newrole
Nicolas Iooss 35af459220 policycoreutils: newrole: always initialize pw fields
In extract_pw_data(), if "getpwuid(uid)" fails, the function returns an
error value without initializing main's pw.pw_name. This leads main() to
call "free(pw.pw_name)" on an uninitialized value.

Use memset() to initialize structure pw in main().

This issue has been found using clang's static analyzer.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2017-04-12 14:48:36 -04:00
..
hashtab.c libsepol: use constant keys in hashtab functions 2017-01-19 08:46:19 -05:00
hashtab.h libsepol: use constant keys in hashtab functions 2017-01-19 08:46:19 -05:00
Makefile policycoreutils: Remove LDFLAGS from CFLAGS 2016-09-26 11:02:40 -04:00
newrole-lspp.pamd initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
newrole.1 policycoreutils, python: Fix bad manpage formatting in "SEE ALSO" 2017-01-12 14:59:31 -05:00
newrole.c policycoreutils: newrole: always initialize pw fields 2017-04-12 14:48:36 -04:00
newrole.pamd Give people who use run_init or newrole an indicator to make it not ask for passwords 2013-10-24 13:58:39 -04:00