From: Mark Spencer Date: Fri, 9 May 2003 19:02:10 +0000 (+0000) Subject: Fix potential seg X-Git-Tag: 0.5.0~511 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=067eae567c8c563f928c65150acf28ffeb4edd50;p=thirdparty%2Fasterisk.git Fix potential seg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@985 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a3ff9f1814..12d80f5b09 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3053,7 +3053,8 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq) req = oreq; if (!req) req = &p->initreq; - strncpy(tmp, req->rlPart2, sizeof(tmp) - 1); + if (req->rlPart2) + strncpy(tmp, req->rlPart2, sizeof(tmp) - 1); c = ditch_braces(tmp); if (strncmp(c, "sip:", 4)) { ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", c);