selinux/mcstrans/src
Petr Lautrbach 8a8a4f8e05 mcstrans: Fix check in raw_color()
raw_color() uses color_str as an output argument which is assigned to a new
allocated memory. Therefore it should fail when color_str is null; or
when *color_str is not null in order to avoid a memory leak.

Fixes:
>>> selinux.selinux_raw_context_to_color('system_u:system_r:inetd_t:s0')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 0] Error

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
2018-12-20 15:13:12 +01:00
..
.gitignore mcstrans: Add .gitignore file 2016-11-16 11:19:50 -05:00
Makefile mcstrans: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:38 +01:00
mcscolor.c mcstrans: Fix check in raw_color() 2018-12-20 15:13:12 +01:00
mcstrans.c mcstrans: fix memory leaks reported by clang's static analyzer 2018-07-04 22:09:06 +02:00
mcstrans.h Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
mcstrans.init Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
mcstrans.service Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
mcstransd.c mcstrans: remove unused getpeercon_raw() call 2018-10-26 09:53:11 -04:00
mls_level.c Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
mls_level.h Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00
README Move policycoreutils/mcstrans to mcstrans. 2016-11-16 11:19:50 -05:00

To rebuild with debugging support:
make clean && env CFLAGS="-Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute -DDEBUG -g" LDFLAGS="-g" make