On Saturday, September 26, 2015 12:34:17 AM Rasmus Villemoes wrote:
> Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk>
> ---
>  security/selinux/ss/services.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied.

> diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
> index c550df0e0ff1..994c824a34c6 100644
> --- a/security/selinux/ss/services.c
> +++ b/security/selinux/ss/services.c
> @@ -1259,12 +1259,12 @@ static int security_sid_to_context_core(u32 sid,
> char **scontext, *scontext_len = strlen(initial_sid_to_string[sid]) + 1;
>                       if (!scontext)
>                               goto out;
> -                     scontextp = kmalloc(*scontext_len, GFP_ATOMIC);
> +                     scontextp = kmemdup(initial_sid_to_string[sid],
> +                                         *scontext_len, GFP_ATOMIC);
>                       if (!scontextp) {
>                               rc = -ENOMEM;
>                               goto out;
>                       }
> -                     strcpy(scontextp, initial_sid_to_string[sid]);
>                       *scontext = scontextp;
>                       goto out;
>               }

-- 
paul moore
www.paul-moore.com

--
To unsubscribe from this list: send the line "unsubscribe 
linux-security-module" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to