Skip to content

Commit

Permalink
Put back base > 35 check. If someone dislike it, plese discuss it with
Browse files Browse the repository at this point in the history
standards group first.
  • Loading branch information
ache authored and ache committed Nov 28, 2001
1 parent 879d96a commit e27de14
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/libc/stdlib/strtol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/stdlib/strtoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/stdlib/strtoul.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/libc/stdlib/strtoull.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e27de14

Please sign in to comment.