mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Auto rewrite integer overflow fixed. Thanks to Gaurav for finding it (see issue 602 on google code), and Pieter Noordhuis for tracing it.
This commit is contained in:
parent
64f201c2aa
commit
11aaf52313
@ -685,7 +685,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
|
||||
server.auto_aofrewrite_perc &&
|
||||
server.appendonly_current_size > server.auto_aofrewrite_min_size)
|
||||
{
|
||||
int base = server.auto_aofrewrite_base_size ?
|
||||
long long base = server.auto_aofrewrite_base_size ?
|
||||
server.auto_aofrewrite_base_size : 1;
|
||||
long long growth = (server.appendonly_current_size*100/base) - 100;
|
||||
if (growth >= server.auto_aofrewrite_perc) {
|
||||
|
Loading…
Reference in New Issue
Block a user