mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 11:51:27 +00:00
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>
This commit is contained in:
parent
fadcdb4516
commit
4f4acf3a47
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user