diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_config_keywords.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index b2e83fe..cbdd579 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -238,8 +238,9 @@ int parse_disabled_functions(char *line) { | |||
| 238 | 238 | ||
| 239 | if (pos) { | 239 | if (pos) { |
| 240 | errno = 0; | 240 | errno = 0; |
| 241 | df->pos = strtol(pos, NULL, 10) > 128 ? 128 : strtol(pos, NULL, 10); | 241 | char *endptr; |
| 242 | if (errno != 0) { | 242 | df->pos = strtol(pos, &endptr, 10) > 128 ? 128 : strtol(pos, NULL, 10); |
| 243 | if (errno != 0 || endptr == pos) { | ||
| 243 | sp_log_err("config", | 244 | sp_log_err("config", |
| 244 | "Failed to parse arg '%s' of `pos` on line %zu.", | 245 | "Failed to parse arg '%s' of `pos` on line %zu.", |
| 245 | pos, sp_line_no); | 246 | pos, sp_line_no); |
