commit | a9094fae2c7bcd14af7263f9bb7fbacff5bc761c | [log] [tgz] |
---|---|---|
author | Nicolas Iooss <nicolas.iooss@m4x.org> | Tue Apr 11 23:46:00 2017 +0200 |
committer | Stephen Smalley <sds@tycho.nsa.gov> | Wed Apr 12 14:44:55 2017 -0400 |
tree | 3858901bd06ee29acfc0ddcc9861995e82ec5129 | |
parent | b63eb892f93249ac217ab878c29245f2cae2dc76 [diff] |
libselinux: avoid calling strcmp() on a NULL pointer When curcon is NULL, calling strcmp(curcon, newcon) produces an undefined behavior. Avoid this by checking whether curcon is NULL beforehand. This issue has been found using clang's static analyzer. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>