]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix potential seg fault (bug #3519)
authorRussell Bryant <russell@russellbryant.com>
Mon, 7 Feb 2005 17:10:25 +0000 (17:10 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 7 Feb 2005 17:10:25 +0000 (17:10 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4982 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index bb7b1a84f1b4860bd582cda506d85d4aaa7aa51c..292389078b00fa4cb92685578d2ae14feaba5e2a 100755 (executable)
@@ -3670,7 +3670,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, char *cmd, c
                ast_callerid_parse(cid, &n, &l);
                if (l) 
                        ast_shrink_phone_number(l);
-               if ((!l || !ast_isphonenumber(l)) && default_callerid[0])
+               if (!l || (ast_isphonenumber(l) && default_callerid[0]))
                                l = default_callerid;
        }
        /* if user want's his callerid restricted */