From: Russell Bryant Date: Mon, 7 Feb 2005 17:10:25 +0000 (+0000) Subject: fix potential seg fault (bug #3519) X-Git-Tag: 1.0.11.1~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2ab9ffaec91664ad5348f898b0df68fd6124a13;p=thirdparty%2Fasterisk.git fix potential seg fault (bug #3519) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4982 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bb7b1a84f1..292389078b 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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 */