Fix crash when hz config out of range (#8658)
Fix crash when hz config out of range
This commit is contained in:
parent
cf0a909e2d
commit
db6655deb4
@ -621,6 +621,10 @@ void loadServerConfigFromString(char *config) {
|
||||
goto loaderr;
|
||||
}
|
||||
|
||||
/* To ensure backward compatibility and work while hz is out of range */
|
||||
if (server.config_hz < CONFIG_MIN_HZ) server.config_hz = CONFIG_MIN_HZ;
|
||||
if (server.config_hz > CONFIG_MAX_HZ) server.config_hz = CONFIG_MAX_HZ;
|
||||
|
||||
sdsfreesplitres(lines,totlines);
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user