summaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2007-02-26 12:02:34 -0500
committerJames Morris <jmorris@namei.org>2007-02-26 14:43:15 -0500
commit4f4acf3a478d5cada688f336f2229ab580f56113 (patch)
treeed549b4f079f8aaefaa47da1027eaf110a7c3013 /security/selinux
parentfadcdb451632d32d7c0d4c71df9ac2d3b7ae2348 (diff)
downloadlinux-4f4acf3a478d5cada688f336f2229ab580f56113.tar.gz
linux-4f4acf3a478d5cada688f336f2229ab580f56113.tar.bz2
linux-4f4acf3a478d5cada688f336f2229ab580f56113.zip
Always initialize scontext and scontext_len
Always initialize *scontext and *scontext_len in security_sid_to_context. (via http://lkml.org/lkml/2007/2/23/135) Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/ss/services.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index ca9154dc5d82..1e52356664d6 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -609,6 +609,9 @@ int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len)
struct context *context;
int rc = 0;
+ *scontext = NULL;
+ *scontext_len = 0;
+
if (!ss_initialized) {
if (sid <= SECINITSID_NUM) {
char *scontextp;