diff --git a/ffserver_config.c b/ffserver_config.c index 691ff7b49e..9fc1f0030c 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -460,7 +460,7 @@ static int ffserver_set_int_param(int *dest, const char *value, int factor, if (tmp < min || tmp > max) goto error; if (factor) { - if (FFABS(tmp) > INT_MAX / FFABS(factor)) + if (tmp == INT_MIN || FFABS(tmp) > INT_MAX / FFABS(factor)) goto error; tmp *= factor; }