diff options
author | marcus <marcus@FreeBSD.org> | 2008-12-27 02:38:37 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2008-12-27 02:38:37 +0800 |
commit | 5db47919892ffe3940c44f4d58a2366205b1f09b (patch) | |
tree | 714aad7a8b9cb27abeeebe7c5a4d96c0fa4ab969 /devel | |
parent | 705a9fb3ef5b5bb88b75a3de4f8bf03765ce5e62 (diff) | |
download | freebsd-ports-gnome-5db47919892ffe3940c44f4d58a2366205b1f09b.tar.gz freebsd-ports-gnome-5db47919892ffe3940c44f4d58a2366205b1f09b.tar.zst freebsd-ports-gnome-5db47919892ffe3940c44f4d58a2366205b1f09b.zip |
Fix an array overflow which led to an assertion crash.
Reported by: miwi
Obtained from: http://bugzilla.openedhand.com/show_bug.cgi?id=1203
Diffstat (limited to 'devel')
-rw-r--r-- | devel/json-glib/Makefile | 1 | ||||
-rw-r--r-- | devel/json-glib/files/patch-json-glib_json-object.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/devel/json-glib/Makefile b/devel/json-glib/Makefile index 6e25e37c2c47..49c5484dbdac 100644 --- a/devel/json-glib/Makefile +++ b/devel/json-glib/Makefile @@ -7,6 +7,7 @@ PORTNAME= json-glib PORTVERSION= 0.6.2 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://folks.o-hand.com/~ebassi/sources/ diff --git a/devel/json-glib/files/patch-json-glib_json-object.c b/devel/json-glib/files/patch-json-glib_json-object.c new file mode 100644 index 000000000000..b01ae9261354 --- /dev/null +++ b/devel/json-glib/files/patch-json-glib_json-object.c @@ -0,0 +1,21 @@ +diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c +index 15e9ed5..eeb571c 100644 +--- json-glib/json-gobject.c ++++ json-glib/json-gobject.c +@@ -189,7 +189,7 @@ json_deserialize_pspec (GValue *value, + { + JsonArray *array = json_node_get_array (node); + guint i, array_len = json_array_get_length (array); +- GPtrArray *str_array = g_ptr_array_sized_new (array_len); ++ GPtrArray *str_array = g_ptr_array_sized_new (array_len + 1); + + for (i = 0; i < array_len; i++) + { +@@ -201,6 +201,7 @@ json_deserialize_pspec (GValue *value, + if (json_node_get_string (val) != NULL); + g_ptr_array_add (str_array, (gpointer) json_node_get_string (val)); + } ++ g_ptr_array_add (str_array, NULL); + + g_value_set_boxed (value, str_array->pdata); + |