diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_config_keywords.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 1f48852..b2e83fe 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -237,7 +237,14 @@ int parse_disabled_functions(char *line) { | |||
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | if (pos) { | 239 | if (pos) { |
| 240 | df->pos = atoi(pos) > 128 ? 128: atoi(pos); // FIXME do the strtol dance | 240 | errno = 0; |
| 241 | df->pos = strtol(pos, NULL, 10) > 128 ? 128 : strtol(pos, NULL, 10); | ||
| 242 | if (errno != 0) { | ||
| 243 | sp_log_err("config", | ||
| 244 | "Failed to parse arg '%s' of `pos` on line %zu.", | ||
| 245 | pos, sp_line_no); | ||
| 246 | return -1; | ||
| 247 | } | ||
| 241 | } | 248 | } |
| 242 | 249 | ||
| 243 | if (df->function) { | 250 | if (df->function) { |
