diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-06-08 10:54:41 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-06-10 18:10:26 +0800 |
commit | 204317a63829d5531cb2c20b4c02dea7b9cc38c3 (patch) | |
tree | cd0dd069943089ceea68280818666d26b432b03f | |
parent | 77d952456357871efc0adbfeb46d5e3917557757 (diff) | |
download | gsoc2013-empathy-204317a63829d5531cb2c20b4c02dea7b9cc38c3.tar gsoc2013-empathy-204317a63829d5531cb2c20b4c02dea7b9cc38c3.tar.gz gsoc2013-empathy-204317a63829d5531cb2c20b4c02dea7b9cc38c3.tar.bz2 gsoc2013-empathy-204317a63829d5531cb2c20b4c02dea7b9cc38c3.tar.lz gsoc2013-empathy-204317a63829d5531cb2c20b4c02dea7b9cc38c3.tar.xz gsoc2013-empathy-204317a63829d5531cb2c20b4c02dea7b9cc38c3.tar.zst gsoc2013-empathy-204317a63829d5531cb2c20b4c02dea7b9cc38c3.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.
-rw-r--r-- | libempathy/empathy-tp-chat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 665e87549..4187038a1 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -396,7 +396,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); |