diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2016-10-24 03:22:46 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2016-10-24 03:22:46 +0000 |
commit | 00aa5887abe1fcef80ed2528aaad9f265c599267 (patch) | |
tree | ae1a92efe11f84ebb8a68cd0cded995c7279880b /pjsip/src | |
parent | 49d98191016269301f21542cc24ecf9d1a3c38f4 (diff) |
Misc (re #1945): Avoid calling memchr() or memcpy() with NULL pointer (thanks Kal from the patch).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5468 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsip/sip_msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pjsip/src/pjsip/sip_msg.c b/pjsip/src/pjsip/sip_msg.c index b5d2eb5f..a13f80e1 100644 --- a/pjsip/src/pjsip/sip_msg.c +++ b/pjsip/src/pjsip/sip_msg.c @@ -2013,7 +2013,7 @@ static int pjsip_via_hdr_print( pjsip_via_hdr *hdr, *buf++ = ' '; /* Check if host contains IPv6 */ - if (pj_memchr(hdr->sent_by.host.ptr, ':', hdr->sent_by.host.slen)) { + if (pj_strchr(&hdr->sent_by.host, ':')) { copy_advance_pair_quote_cond(buf, "", 0, hdr->sent_by.host, '[', ']'); } else { copy_advance_check(buf, hdr->sent_by.host); |