Fix a seg fault on a registration. Line 7706, in parse_register_contact,
authorRussell Bryant <russell@russellbryant.com>
Tue, 24 Oct 2006 00:52:06 +0000 (00:52 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 24 Oct 2006 00:52:06 +0000 (00:52 +0000)
explicitly passes NULL as the "pass" argument to this function.

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

channels/chan_sip.c

index d888fa1..4dd79a1 100644 (file)
@@ -2254,9 +2254,9 @@ static int parse_uri(char *uri, char *scheme,
        int error = 0;
 
        /* init field as required */
-       if (*pass)
+       if (pass && *pass)
                *pass = "";
-       if (*port)
+       if (port && *port)
                *port = "";
        name = strsep(&uri, ";");       /* remove options */
        if (scheme) {