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]
Date:   Mon, 18 Dec 2017 11:23:59 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Serhey Popovych <serhe.popovych@...il.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 1/3] iplink: Improve index parameter handling

On Mon, 18 Dec 2017 20:54:06 +0200
Serhey Popovych <serhe.popovych@...il.com> wrote:

> diff --git a/ip/iplink.c b/ip/iplink.c
> index 1e685cc..4f9c169 100644
> --- a/ip/iplink.c
> +++ b/ip/iplink.c
> @@ -586,8 +586,10 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
>  			*name = *argv;
>  		} else if (strcmp(*argv, "index") == 0) {
>  			NEXT_ARG();
> +			if (*index)
> +				duparg("index", *argv);
>  			*index = atoi(*argv);
> -			if (*index < 0)
> +			if (*index <= 0)

Why not use strtoul instead of atoi?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ