summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-03-25 15:09:10 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-03-25 15:09:10 -0400
commit3895af7b6df288a0aa0417d28dc80a3af4ab2519 (patch)
tree53101eaef88f7d33b2dc1c1d786755586451a22e
parent854fe9602943ded67ca6e5e0963e9833864f066a (diff)
downloadtelepathy-logger-3895af7b6df288a0aa0417d28dc80a3af4ab2519.tar.gz
Cast to gint64 before setting "duration" property
Without the cast, a 32bit integer will be stored in the va_list, which will lead to a shorter structure and potential crash.
-rw-r--r--tests/dbus/test-tpl-log-store-xml.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c
index f915dd4..0ac9e26 100644
--- a/tests/dbus/test-tpl-log-store-xml.c
+++ b/tests/dbus/test-tpl-log-store-xml.c
@@ -494,7 +494,7 @@ test_add_call_event (XmlTestCaseFixture *fixture,
"receiver", contact,
"timestamp", timestamp,
/* TplCallEvent */
- "duration", 1234,
+ "duration", (gint64) 1234,
"end-actor", me,
"end-reason", TPL_CALL_END_REASON_USER_REQUESTED,
"detailed-end-reason", TP_ERROR_STR_CANCELLED,
@@ -523,7 +523,7 @@ test_add_call_event (XmlTestCaseFixture *fixture,
"receiver", me,
"timestamp", timestamp,
/* TplCallEvent */
- "duration", 2345,
+ "duration", (gint64) 2345,
"end-actor", contact,
"end-reason", TPL_CALL_END_REASON_USER_REQUESTED,
"detailed-end-reason", TP_ERROR_STR_TERMINATED,
@@ -552,7 +552,7 @@ test_add_call_event (XmlTestCaseFixture *fixture,
"receiver", room,
"timestamp", timestamp,
/* TplCallEvent */
- "duration", 3456,
+ "duration", (gint64) 3456,
"end-actor", room,
"end-reason", TPL_CALL_END_REASON_USER_REQUESTED,
"detailed-end-reason", TP_ERROR_STR_CHANNEL_KICKED,
@@ -581,7 +581,7 @@ test_add_call_event (XmlTestCaseFixture *fixture,
"receiver", room,
"timestamp", timestamp,
/* TplCallEvent */
- "duration", -1,
+ "duration", (gint64) -1,
"end-actor", room,
"end-reason", TPL_CALL_END_REASON_NO_ANSWER,
"detailed-end-reason", "",