[gnumeric] Fixed an array access issue.
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fixed an array access issue.
- Date: Sun, 18 Mar 2012 10:21:45 +0000 (UTC)
commit 946aae001e13b7de9c885c41f21817d607728fd1
Author: Jean Brefort <jean brefort normalesup org>
Date: Sun Mar 18 11:15:55 2012 +0100
Fixed an array access issue.
ChangeLog | 5 +++++
src/graph.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 68e1acc..e12dc59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-18 Jean Brefort <jean brefort normalesup org>
+
+ * src/graph.c (gnm_go_data_vector_get_markup): don't access an array with
+ an index larger than the size.
+
2012-03-14 Morten Welinder <terra gnome org>
* src/cell.h (struct _GnmCell): remove row_info pointers. All
diff --git a/src/graph.c b/src/graph.c
index f421222..fda7032 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -911,7 +911,8 @@ gnm_go_data_vector_get_markup (GODataVector *dat, unsigned i)
}
}
- return pango_attr_list_copy (g_ptr_array_index (vec->markup, i));
+ return pango_attr_list_copy ((vec->markup->len > i)?
+ g_ptr_array_index (vec->markup, i): NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]