mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
ffserver_config: check for INT_MIN before doing FFABS
FFABS(INT_MIN) is not safe. Alternative of using FFNABS is not as readable. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
parent
74a87ae210
commit
4c8ca76965
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user