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: <20171117125429.39d68251@xeon-e3>
Date:   Fri, 17 Nov 2017 12:54:29 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Nishanth Devarajan <ndev2021@...il.com>
Cc:     netdev@...r.kernel.org, doucette@...edu, michel.machado@...il.com
Subject: Re: [PATCH iproute2/net-next v3]tc: B.W limits can now be specified
 in %.

On Sat, 18 Nov 2017 02:13:38 +0530
Nishanth Devarajan <ndev2021@...il.com> wrote:

> +	result = strtoul(buf, &endp, 0);
> +
> +	if (*endp || buf == endp) {
> +		fprintf(stderr, "value \"%s\" in file %s is not a number\n",
> +			buf, fname);
> +		goto out;
> +	}
> +
> +	if (result == ULONG_MAX && errno == ERANGE) {
> +		fprintf(stderr, "strtoul %s: %s", fname, strerror(errno));
> +		goto out;
> +	}

Since speed value of unknown is represented as "-1" I think you need to
change this API to take signed value (ie use strtol)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ