chan_gtalk: Fix potential use of uninitialized variable.
authorRussell Bryant <russell@russellbryant.com>
Thu, 15 Mar 2012 00:07:18 +0000 (00:07 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 15 Mar 2012 00:07:18 +0000 (00:07 +0000)
Avoid potential use of idroster in gtalk_alloc() before it has been
initialized.
........

Merged revisions 359508 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 359509 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@359510 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_gtalk.c

index c13cbfc..dcc3c48 100644 (file)
@@ -1004,7 +1004,7 @@ static struct gtalk_pvt *gtalk_alloc(struct gtalk *client, const char *us, const
        struct gtalk_pvt *tmp = NULL;
        struct aji_resource *resources = NULL;
        struct aji_buddy *buddy = NULL;
-       char idroster[200];
+       char idroster[200] = "";
        char *data, *exten = NULL;
        struct ast_sockaddr bindaddr_tmp;