selinux/libselinux/src
Nicolas Iooss a9094fae2c 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>
2017-04-12 14:44:55 -04:00
..
.gitignore
Makefile libselinux, libsemanage: make PYPREFIX computation more robust 2017-02-21 13:42:52 -05:00
audit2why.c libsepol,libselinux,audit2allow: teach audit2why about type bounds failures 2016-11-29 15:53:59 -05:00
avc.c
avc_internal.c libselinux: normalize enforce values from the kernel 2016-11-18 09:48:25 -05:00
avc_internal.h
avc_sidtab.c
avc_sidtab.h
booleans.c libselinux: make process_boolean() fail on invalid lines 2017-04-11 14:27:01 -04:00
callbacks.c libselinux: add ifdef'ing for ANDROID and BUILD_HOST 2016-09-26 15:15:31 -04:00
callbacks.h
canonicalize_context.c
checkAccess.c libselinux: flush the class/perm string mapping cache on policy reload 2015-09-22 12:16:44 -04:00
check_context.c
compute_av.c
compute_create.c
compute_member.c
compute_relabel.c
compute_user.c
context.c
context_internal.h
deny_unknown.c
disable.c
dso.h
enabled.c enabled.c: Remove stdio_ext.h header 2016-11-28 09:29:41 -05:00
exception.sh libselinux, libsemanage: swig: use SWIG_fail when an error occurs 2016-11-15 11:11:25 -05:00
fgetfilecon.c libselinux: Fix unitialized variable compiler warnings 2017-01-06 12:15:12 -05:00
file_path_suffixes.h libselinux: Add openrc_contexts functions 2016-09-22 13:27:45 -04:00
freecon.c
freeconary.c
fsetfilecon.c
get_context_list.c
get_context_list_internal.h
get_default_type.c
get_default_type_internal.h
get_initial_context.c
getenforce.c libselinux: normalize enforce values from the kernel 2016-11-18 09:48:25 -05:00
getfilecon.c libselinux: Fix unitialized variable compiler warnings 2017-01-06 12:15:12 -05:00
getpeercon.c
init.c libselinux: public symbol cleanup 2016-09-21 11:09:26 -04:00
is_customizable_type.c
label.c libselinux: do not dereference a NULL pointer when calloc() fails 2017-04-11 14:19:52 -04:00
label_backends_android.c libselinux: replace all malloc + memset by calloc in android label backend. 2017-01-13 10:46:29 -05:00
label_db.c libselinux: always free catalog in db_init() 2017-01-19 08:48:49 -05:00
label_file.c libselinux: fix unused variable error 2016-09-28 12:02:25 -04:00
label_file.h label_file.h: actually use the results of compat_validate 2016-11-21 09:24:31 -05:00
label_internal.h libselinux: fix mac build warning when ANDROID_HOST=y 2016-10-18 13:49:55 -04:00
label_media.c libselinux: Fix selabel_open(3) services if no digest requested 2015-10-15 12:13:42 -04:00
label_support.c read_spec_entry: fail on non-ascii 2016-02-17 09:10:41 -05:00
label_x.c libselinux: Fix selabel_open(3) services if no digest requested 2015-10-15 12:13:42 -04:00
lgetfilecon.c libselinux: Fix unitialized variable compiler warnings 2017-01-06 12:15:12 -05:00
libselinux.pc.in
load_policy.c libsepol: constify sepol_genbools()'s boolpath parameter 2017-03-29 10:26:44 -04:00
lsetfilecon.c
mapping.c
mapping.h libselinux: drop DISABLE_AVC=y 2016-09-28 11:43:36 -04:00
matchmediacon.c
matchpathcon.c libselinux: fix pointer handling in realpath_not_final 2016-10-27 10:40:36 -04:00
policy.h Fix redefinition of XATTR_NAME_SELINUX 2016-09-22 13:21:39 -04:00
policyvers.c
procattr.c procattr.c: Use __ANDROID__ instead of ANDROID 2016-11-28 09:32:21 -05:00
query_user_context.c
regex.c libselinux/src/regex.c: support old compilers for the endian check 2017-01-25 09:18:16 -05:00
regex.h libselinux: Add architecture string to file_context.bin 2016-09-28 07:51:58 -04:00
selinux_check_securetty_context.c
selinux_config.c libselinux: Add openrc_contexts functions 2016-09-22 13:27:45 -04:00
selinux_internal.h libselinux: Add openrc_contexts functions 2016-09-22 13:27:45 -04:00
selinux_netlink.h
selinux_restorecon.c libselinux: avoid calling strcmp() on a NULL pointer 2017-04-12 14:44:55 -04:00
selinuxswig.i libselinux: initialize temp value in SWIG wrapper to prevent freeing garbage 2017-03-01 10:42:45 -05:00
selinuxswig_python.i libselinux: Rewrite restorecon() python method 2017-01-09 13:23:20 -05:00
selinuxswig_ruby.i libselinux: remove rpm_execcon from SWIG wrappers 2016-11-07 15:55:08 -05:00
sestatus.c
setenforce.c
setexecfilecon.c
setfilecon.c
setrans_client.c libselinux: include errno.h instead of sys/errno.h 2017-01-09 16:00:22 -05:00
setrans_internal.h
seusers.c
sha1.c libselinux: fix required alignment for sha1.c on mac 2016-10-18 13:51:11 -04:00
sha1.h libselinux: Replace selabel_digest hash function 2015-10-22 11:55:02 -04:00
stringrep.c libselinux: flush the class/perm string mapping cache on policy reload 2015-09-22 12:16:44 -04:00