lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46AF69C3.1040900@goop.org>
Date:	Tue, 31 Jul 2007 09:56:35 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Neil Horman <nhorman@...driver.com>
CC:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] argv_split: allow argv_split to handle NULL pointer in
 argcp parameter gracefully

Neil Horman wrote:
> As Jeremy and I had discussed in a previous thread, it would be nice if the
> argv_split library function could gracefully handle a NULL pointer in the argcp
> parameter, so as to allow functions using it that did not care about the value
> of argc to not have to declare a useless variable.  This patch accomplishes
> that.  Tested by me, with successful results.
>   

Oh, one other thing.  Could you do a patch to clean up the use in the
usermodehelper code?

    J
> Thanks & Regards
> Neil
>
> Signed-off-by: Neil Horman <nhorman@...driver.com>
>
>
>  argv_split.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
>
> diff --git a/lib/argv_split.c b/lib/argv_split.c
> index 4096ed4..fad6ce4 100644
> --- a/lib/argv_split.c
> +++ b/lib/argv_split.c
> @@ -75,7 +75,9 @@ char **argv_split(gfp_t gfp, const char *str, int *argcp)
>  	if (argv == NULL)
>  		goto out;
>  
> -	*argcp = argc;
> +	if (argcp)
> +		*argcp = argc;
> +
>  	argvp = argv;
>  
>  	while (*str) {
>   

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ