Re: [PATCH] selftests/capabilities/test_execve: Initialize the variable have_outer_privilege

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/14/25 10:41 AM, liuye wrote:
>     Uninitialized variable: have_outer_privilege.
>     Fix it.
Please improve the description. Explain how the current code
is wrong. After that add:
Reviewed-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx>

> 
> Signed-off-by: liuye <liuye@xxxxxxxxxx>
> ---
>  tools/testing/selftests/capabilities/test_execve.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/capabilities/test_execve.c b/tools/testing/selftests/capabilities/test_execve.c
> index 47bad7ddc5bc..c9617b38d6f7 100644
> --- a/tools/testing/selftests/capabilities/test_execve.c
> +++ b/tools/testing/selftests/capabilities/test_execve.c
> @@ -83,7 +83,7 @@ static bool create_and_enter_ns(uid_t inner_uid)
>  	uid_t outer_uid;
>  	gid_t outer_gid;
>  	int i, ret;
> -	bool have_outer_privilege;
> +	bool have_outer_privilege = false;
>  
>  	outer_uid = getuid();
>  	outer_gid = getgid();


-- 
BR,
Muhammad Usama Anjum




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux