rpcclient: Use wrapper for string to integer conversion
authorSwen Schillig <swen@linux.ibm.com>
Mon, 28 Jan 2019 13:35:30 +0000 (14:35 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2019 00:32:10 +0000 (00:32 +0000)
commit414bc3748b6fbd54cbd50a0ff1f20cbe31b06ccc
tree4042813f192bb431e218c0c41c0ad8a822dca2d3
parentc067429c32b7e8853274f8711bb5c5bd33b5e628
rpcclient: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpcclient/cmd_samr.c
source3/rpcclient/cmd_spoolss.c