core/selinux-access: do not use NULL for %s
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 Feb 2020 20:16:08 +0000 (21:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 6 Feb 2020 21:27:12 +0000 (22:27 +0100)
commit22cd7aabecd81fca14026749e48eadddff98a4bd
tree5af2ddfadff985f7fa1775c08810695828b42a27
parent949fb07e6e3e24f2a91a5ef940ee13894b0ecef5
core/selinux-access: do not use NULL for %s

../src/core/selinux-access.c: In function ‘mac_selinux_generic_access_check’:
../src/basic/log.h:223:27: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
../src/core/selinux-access.c:235:85: note: format string is defined here
  235 |                         log_warning_errno(errno, "SELinux getcon_raw failed (tclass=%s perm=%s): %m", tclass, permission);
      |                                                                                     ^~

I wonder why nobody ever noticed this.

Fixes #14691 (other issues listed in that ticket have already been fixed).
src/core/selinux-access.c