aboutsummaryrefslogtreecommitdiffstats
path: root/apply.c
diff options
context:
space:
mode:
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apply.c b/apply.c
index 4a7b6120ac..b124678b93 100644
--- a/apply.c
+++ b/apply.c
@@ -1423,7 +1423,10 @@ static int parse_num(const char *line, unsigned long *p)
if (!isdigit(*line))
return 0;
+ errno = 0;
*p = strtoul(line, &ptr, 10);
+ if (errno)
+ return 0;
return ptr - line;
}