提交 4f4acf3a 编写于 作者: S Stephen Smalley 提交者: James Morris

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: NStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 fadcdb45
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册