From: Stephen Smalley Date: Mon, 26 Feb 2007 17:02:34 +0000 (-0500) Subject: Always initialize scontext and scontext_len X-Git-Tag: v2.6.21-rc2~39^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4f4acf3a478d5cada688f336f2229ab580f56113;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: James Morris --- diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index ca9154dc5d8..1e52356664d 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;