diff options
Diffstat (limited to 'apply.c')
| -rw-r--r-- | apply.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4961,7 +4961,8 @@ static int apply_option_parse_p(const struct option *opt, BUG_ON_OPT_NEG(unset); - state->p_value = atoi(arg); + if (strtol_i(arg, 10, &state->p_value) < 0 || state->p_value < 0) + die(_("option -p expects a non-negative integer, got '%s'"), arg); state->p_value_known = 1; return 0; } |
