summaryrefslogtreecommitdiff
path: root/egg/egg-secure-memory.c
diff options
context:
space:
mode:
authorstefw <stefw@localhost>2009-04-10 21:33:45 +0000
committerstefw <stefw@localhost>2009-04-10 21:33:45 +0000
commitd070a88dd0cf72992c77183d77360db403fab809 (patch)
treed0633092d82fb620d7de67f1ecdce1fd2e42f1f9 /egg/egg-secure-memory.c
parent9f6679d57d536051d40f72e0390b0e517e0d2bfe (diff)
downloadgnome-keyring-d070a88dd0cf72992c77183d77360db403fab809.tar.gz
Fix problem with integer overflow in memory allocator.
svn path=/branches/gnome-2-26/; revision=1717
Diffstat (limited to 'egg/egg-secure-memory.c')
-rw-r--r--egg/egg-secure-memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/egg/egg-secure-memory.c b/egg/egg-secure-memory.c
index ddee8ffa..2791e5ee 100644
--- a/egg/egg-secure-memory.c
+++ b/egg/egg-secure-memory.c
@@ -661,7 +661,7 @@ sec_realloc (Block *block, void *memory, size_t length)
break;
/* Eat the whole neighbor if not too big */
- if (n_words - cell->n_words >= other->n_words + WASTE) {
+ if (n_words - cell->n_words + WASTE >= other->n_words) {
cell->n_words += other->n_words;
sec_write_guards (cell);
sec_remove_cell_ring (&block->unused, other);