From: Jeremy Allison Date: Mon, 16 Apr 2007 22:42:45 +0000 (+0000) Subject: r22285: Allow arbitrary bases in int and ulong parsing. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~692 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1f1949ff134c343cb0ee8f8e46cf58b1dfe97c7;p=thirdparty%2Fsamba.git r22285: Allow arbitrary bases in int and ulong parsing. Jeremy. --- diff --git a/source/param/loadparm.c b/source/param/loadparm.c index ea434e47689..c37fe54418e 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -2232,7 +2232,7 @@ static int lp_int(const char *s) return (-1); } - return atoi(s); + return (int)strtol(s, NULL, 0); } /******************************************************************* @@ -2246,7 +2246,7 @@ static unsigned long lp_ulong(const char *s) return (0); } - return strtoul(s, NULL, 10); + return strtoul(s, NULL, 0); } /*******************************************************************