Merged revisions 94256 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 20 Dec 2007 20:25:05 +0000 (20:25 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 20 Dec 2007 20:25:05 +0000 (20:25 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r94256 | russell | 2007-12-20 14:22:22 -0600 (Thu, 20 Dec 2007) | 13 lines

Merged revisions 94255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r94255 | russell | 2007-12-20 14:21:41 -0600 (Thu, 20 Dec 2007) | 5 lines

Fix another potential seg fault ...

(closes issue #11606)
Reported by: dimas

........

................

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

channels/chan_iax2.c

index 528c10c..b424c60 100644 (file)
@@ -2972,7 +2972,7 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in
                 * is because we only have the IP address and the host field might be
                 * set as a name (and the reverse PTR might not match).
                 */
-               if (var) {
+               if (var && sin) {
                        for (tmp = var; tmp; tmp = tmp->next) {
                                if (!strcasecmp(tmp->name, "host")) {
                                        struct in_addr sin2 = { 0, };