diff options
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c index 2ea8ba991..0e7a7d2bb 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1803,7 +1803,10 @@ zstrtol(const char *s, char **t, int base) base = 8; } inp = s; - if (base <= 10) + if (base > 36) { + zerr("invalid base: %d", base); + return (zlong)0; + } else if (base <= 10) for (; *s >= '0' && *s < ('0' + base); s++) { if (trunc) continue; |