[gnome-contacts] contact: Don't copy an array of unknown length
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] contact: Don't copy an array of unknown length
- Date: Sun, 4 Sep 2011 13:21:14 +0000 (UTC)
commit a95fc7c65d2fb92e282a95f03f8006ca79b00a2d
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Sep 4 14:19:52 2011 +0100
contact: Don't copy an array of unknown length
This typically results in a crash due to using an uninitialised variable
for the array length (and everything goes downhill from there). See:
bgo#612664.
src/contacts-contact.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index 5269b2e..7f28f63 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -720,7 +720,7 @@ public class Contacts.Contact : GLib.Object {
if (tp == null || tp.contact == null)
return false;
- var types = tp.contact.client_types;
+ unowned string[] types = tp.contact.client_types;
return (types != null && types[0] == "phone");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]