diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-09-17 21:05:13 +0800 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-09-17 21:05:13 +0800 |
commit | b79bf3d187cabd11df74d2e6e414e41ae637f307 (patch) | |
tree | e57eab06b64b6074a4115cd33a326a7321c242bf /e-util | |
parent | a4eb9cc4d2878910f1cee45734fac75728603af7 (diff) | |
download | gsoc2013-evolution-b79bf3d187cabd11df74d2e6e414e41ae637f307.tar.gz gsoc2013-evolution-b79bf3d187cabd11df74d2e6e414e41ae637f307.tar.zst gsoc2013-evolution-b79bf3d187cabd11df74d2e6e414e41ae637f307.zip |
Bug 628522 - invalid access off end of array in e_bit_array_delete()
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-bit-array.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c index 842361d0f2..d8aa620c8d 100644 --- a/e-util/e-bit-array.c +++ b/e-util/e-bit-array.c @@ -75,10 +75,11 @@ e_bit_array_delete_real (EBitArray *eba, gint row, gboolean move_selection_mode) gint i; gint last; gint selected = FALSE; - if (eba->bit_count >= 0) { + + if (eba->bit_count > 0) { guint32 bitmask; box = row >> 5; - last = eba->bit_count >> 5; + last = (eba->bit_count - 1) >> 5; /* Build bitmasks for the left and right half of the box */ bitmask = BITMASK_RIGHT (row) >> 1; |