dect
/
asterisk
Archived
13
0
Fork 0

Fix potential seg

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@985 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2003-05-09 19:02:10 +00:00
parent 4748dfa960
commit ff68902855
1 changed files with 2 additions and 1 deletions

View File

@ -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);