aboutsummaryrefslogtreecommitdiff
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 7608e3301c..e3b98b0731 100644
--- a/apply.c
+++ b/apply.c
@@ -1426,7 +1426,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;
}