From 5f448d9a8b06546b8f0d2280a6f5eb5865c1f83c Mon Sep 17 00:00:00 2001 From: FRIGN Date: Sun, 25 Jan 2015 15:07:13 +0100 Subject: [PATCH] Use strtoul in expand(1) and force base 10 --- expand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expand.c b/expand.c index 78b5454..126fe32 100644 --- a/expand.c +++ b/expand.c @@ -33,7 +33,7 @@ parselist(const char *s, size_t slen) m = 0; for (i = 0; i < slen; i += sep - (s + i) + 1) { - tablist[m++] = strtol(s + i, &sep, 0); + tablist[m++] = strtoul(s + i, &sep, 10); if (tablist[m - 1] == 0) eprintf("expand: tab size can't be zero.\n"); if (*sep && *sep != ',' && *sep != ' ')