diff options
author | Nicolas Iooss <nicolas.iooss@m4x.org> | 2017-04-11 23:46:03 +0200 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2017-04-12 14:48:36 -0400 |
commit | 35af4592202cc4e7d7f605ce5d51dce5827cd55a (patch) | |
tree | 80a56c941389db23c64948a3fd12a352147b1294 /libselinux/src/stringrep.c | |
parent | bfe40222e2bd5955b13c83149a369335721a58d2 (diff) | |
download | android_external_selinux-35af4592202cc4e7d7f605ce5d51dce5827cd55a.tar.gz android_external_selinux-35af4592202cc4e7d7f605ce5d51dce5827cd55a.tar.bz2 android_external_selinux-35af4592202cc4e7d7f605ce5d51dce5827cd55a.zip |
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>
Diffstat (limited to 'libselinux/src/stringrep.c')
0 files changed, 0 insertions, 0 deletions