summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-11-28 02:17:22 +0000
committerache <ache@FreeBSD.org>2001-11-28 02:17:22 +0000
commite27de1447ab399e87a8b7045a1b99bc9052326fd (patch)
treee05be326c2cd9092a4d9a5e7d528b86f6642dc10
parent879d96aeb678c23b6fa4dbf84ea7e18eb0b3fa89 (diff)
downloadFreeBSD-src-e27de1447ab399e87a8b7045a1b99bc9052326fd.zip
FreeBSD-src-e27de1447ab399e87a8b7045a1b99bc9052326fd.tar.gz
Put back base > 35 check. If someone dislike it, plese discuss it with
standards group first.
-rw-r--r--lib/libc/stdlib/strtol.c2
-rw-r--r--lib/libc/stdlib/strtoll.c2
-rw-r--r--lib/libc/stdlib/strtoul.c2
-rw-r--r--lib/libc/stdlib/strtoull.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/stdlib/strtol.c b/lib/libc/stdlib/strtol.c
index 10d7425c..0772894 100644
--- a/lib/libc/stdlib/strtol.c
+++ b/lib/libc/stdlib/strtol.c
@@ -87,7 +87,7 @@ strtol(nptr, endptr, base)
if (base == 0)
base = c == '0' ? 8 : 10;
acc = any = 0;
- if (base < 2)
+ if (base < 2 || base > 35)
goto noconv;
/*
diff --git a/lib/libc/stdlib/strtoll.c b/lib/libc/stdlib/strtoll.c
index 5d656c1..2992ec8 100644
--- a/lib/libc/stdlib/strtoll.c
+++ b/lib/libc/stdlib/strtoll.c
@@ -86,7 +86,7 @@ strtoll(nptr, endptr, base)
if (base == 0)
base = c == '0' ? 8 : 10;
acc = any = 0;
- if (base < 2)
+ if (base < 2 || base > 35)
goto noconv;
/*
diff --git a/lib/libc/stdlib/strtoul.c b/lib/libc/stdlib/strtoul.c
index e952663..e9046b0 100644
--- a/lib/libc/stdlib/strtoul.c
+++ b/lib/libc/stdlib/strtoul.c
@@ -84,7 +84,7 @@ strtoul(nptr, endptr, base)
if (base == 0)
base = c == '0' ? 8 : 10;
acc = any = 0;
- if (base < 2)
+ if (base < 2 || base > 35)
goto noconv;
cutoff = ULONG_MAX / base;
diff --git a/lib/libc/stdlib/strtoull.c b/lib/libc/stdlib/strtoull.c
index 15a0972..3e9b400 100644
--- a/lib/libc/stdlib/strtoull.c
+++ b/lib/libc/stdlib/strtoull.c
@@ -84,7 +84,7 @@ strtoull(nptr, endptr, base)
if (base == 0)
base = c == '0' ? 8 : 10;
acc = any = 0;
- if (base < 2)
+ if (base < 2 || base > 35)
goto noconv;
cutoff = ULLONG_MAX / base;
OpenPOWER on IntegriCloud