]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip netns: use strtol() instead of atoi()
authorRoman Mashak <mrv@mojatatu.com>
Tue, 31 Oct 2017 18:24:19 +0000 (14:24 -0400)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 1 Nov 2017 21:06:05 +0000 (22:06 +0100)
commitacbe9118ce8086f765ffb0da15f80c7c01a8903a
tree0d2e501ef522e2e96eec066c2f05d6e0f709248b
parente3488892897dbd4c7b33f7899f768c75893aff6d
ip netns: use strtol() instead of atoi()

Use strtol-based API to parse and validate integer input; atoi() does
not detect errors and may yield undefined behaviour if result can't be
represented.

v2: use get_unsigned() since network namespace is really an unsigned value.

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
ip/ipnetns.c