diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-02-17 17:21:28 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-06-08 00:20:10 +0300 |
commit | 4d3d0ed60ee0d2da4c541e525c132dc374464624 (patch) | |
tree | 421ef603a1a83df177f2e62b059b49ef1079f2ab /crypto/pcbc.c | |
parent | 494688efdc5912b858d0a05563c9cf258c75d29a (diff) | |
download | linux-4d3d0ed60ee0d2da4c541e525c132dc374464624.tar.xz |
selinux: drop unnecessary NULL check
Commit e3489f8974e1 ("selinux: kill selinux_sb_get_mnt_opts()")
introduced a NULL check on the context after a successful call to
security_sid_to_context(). This is on the one hand redundant after
checking for success and on the other hand insufficient on an actual
NULL pointer, since the context is passed to seq_escape() leading to a
call of strlen() on it.
Reported by Clang analyzer:
In file included from security/selinux/hooks.c:28:
In file included from ./include/linux/tracehook.h:50:
In file included from ./include/linux/memcontrol.h:13:
In file included from ./include/linux/cgroup.h:18:
./include/linux/seq_file.h:136:25: warning: Null pointer passed as 1st argument to string length function [unix.cstring.NullArg]
seq_escape_mem(m, src, strlen(src), flags, esc);
^~~~~~~~~~~
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'crypto/pcbc.c')
0 files changed, 0 insertions, 0 deletions