|
@@ -546,6 +546,7 @@ static int filter_add_pred(struct filter_parse_state *ps,
|
|
|
filter_pred_fn_t fn;
|
|
|
unsigned long long val;
|
|
|
int string_type;
|
|
|
+ int ret;
|
|
|
|
|
|
pred->fn = filter_pred_none;
|
|
|
|
|
@@ -581,7 +582,11 @@ static int filter_add_pred(struct filter_parse_state *ps,
|
|
|
pred->not = 1;
|
|
|
return filter_add_pred_fn(ps, call, pred, fn);
|
|
|
} else {
|
|
|
- if (strict_strtoull(pred->str_val, 0, &val)) {
|
|
|
+ if (field->is_signed)
|
|
|
+ ret = strict_strtoll(pred->str_val, 0, &val);
|
|
|
+ else
|
|
|
+ ret = strict_strtoull(pred->str_val, 0, &val);
|
|
|
+ if (ret) {
|
|
|
parse_error(ps, FILT_ERR_ILLEGAL_INTVAL, 0);
|
|
|
return -EINVAL;
|
|
|
}
|