]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r22285: Allow arbitrary bases in int and ulong parsing.
authorJeremy Allison <jra@samba.org>
Mon, 16 Apr 2007 22:42:45 +0000 (22:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:24 +0000 (12:19 -0500)
Jeremy.

source/param/loadparm.c

index ea434e476896acf79e9d781678258f5f1796116b..c37fe54418ee842fbc65b435730da9e5ba888c88 100644 (file)
@@ -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);
 }
 
 /*******************************************************************