[evolution/gnome-2-32] Bug #628522 - Invalid access off end of array in e_bit_array_delete()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-32] Bug #628522 - Invalid access off end of array in e_bit_array_delete()
- Date: Wed, 29 Sep 2010 09:17:58 +0000 (UTC)
commit a86159e5df2de773ea1ab2c10072d2cec86ecedd
Author: David Woodhouse <David Woodhouse intel com>
Date: Wed Sep 29 11:17:24 2010 +0200
Bug #628522 - Invalid access off end of array in e_bit_array_delete()
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 842361d..d8aa620 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]