From 8923d64fea7f249acb019ad2566828e7af9ea68c Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 29 Sep 2011 11:59:54 +0200 Subject: [PATCH] firefox web history indexing: typo in memory reallocation call might have caused problems in highly improbable case --- src/utils/circache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/circache.cpp b/src/utils/circache.cpp index d90c7169..85b1d218 100644 --- a/src/utils/circache.cpp +++ b/src/utils/circache.cpp @@ -1117,7 +1117,7 @@ static void *allocmem( return cp; } - int inc = (*np > maxinc) ? : *np; + int inc = (*np > maxinc) ? maxinc : *np; if ((cp = realloc(cp, (*np + inc) * sz)) != 0) *np += inc; return cp;