aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-06-08 10:54:41 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-06-08 20:00:49 +0800
commite5773f0b667fabbf0597ab2c3600164fc018c727 (patch)
tree72285373a4e21736ac25e2fa6842aea96bef6373 /libempathy
parentf63939a4648a0ebd64a2ff1468a72036adadb581 (diff)
downloadgsoc2013-empathy-e5773f0b667fabbf0597ab2c3600164fc018c727.tar
gsoc2013-empathy-e5773f0b667fabbf0597ab2c3600164fc018c727.tar.gz
gsoc2013-empathy-e5773f0b667fabbf0597ab2c3600164fc018c727.tar.bz2
gsoc2013-empathy-e5773f0b667fabbf0597ab2c3600164fc018c727.tar.lz
gsoc2013-empathy-e5773f0b667fabbf0597ab2c3600164fc018c727.tar.xz
gsoc2013-empathy-e5773f0b667fabbf0597ab2c3600164fc018c727.tar.zst
gsoc2013-empathy-e5773f0b667fabbf0597ab2c3600164fc018c727.zip
Check we actually have a part #1 before requesting it
We were checking echo->len >= 1, but then requesting index 1 (the second part). So if we didn't have a second part, this would quite happily blow up.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-chat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 5d4ce26f7..63b1e87d6 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -376,7 +376,7 @@ handle_delivery_report (EmpathyTpChat *self,
* TpMessage. (fdo #35884) */
echo = tp_asv_get_boxed (header, "delivery-echo",
TP_ARRAY_TYPE_MESSAGE_PART_LIST);
- if (echo != NULL && echo->len >= 1) {
+ if (echo != NULL && echo->len >= 2) {
const GHashTable *echo_body;
echo_body = g_ptr_array_index (echo, 1);