Permalink
Browse files

Auto rewrite integer overflow fixed. Thanks to Gaurav for finding it …

…(see issue 602 on google code), and Pieter Noordhuis for tracing it.
  • Loading branch information...
antirez committed Aug 9, 2011
1 parent a57bd79 commit 4a4f4cb5ffb1f6318a8eba02895b1e30398197a9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/redis.c
View
@@ -635,7 +635,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) {

0 comments on commit 4a4f4cb

Please sign in to comment.