[telepathy-gabble/master] gabble_ft_manager_handle_si_request: initialize the struct tm

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Apr 3 04:51:01 PDT 2009


Thanks strptime...
---
 src/ft-manager.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/ft-manager.c b/src/ft-manager.c
index 1b9a52a..327b360 100644
--- a/src/ft-manager.c
+++ b/src/ft-manager.c
@@ -538,6 +538,8 @@ void gabble_ft_manager_handle_si_request (GabbleFtManager *self,
     {
       struct tm tm;
 
+      memset (&tm, 0, sizeof (struct tm));
+
       /* FIXME: this assume the timezone is always UTC */
       if (strptime (date_str, "%FT%H:%M:%SZ", &tm) != NULL)
         date = (guint64) mktime (&tm);
-- 
1.5.6.5




More information about the telepathy-commits mailing list