diff options
author | Mark Spencer <markster@digium.com> | 2004-11-09 02:38:18 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-11-09 02:38:18 +0000 |
commit | 1fd3b9976a7a75b12187076728119dbac2692bcb (patch) | |
tree | f3a370151263b6f840258830b9e890aca3f12705 /channels/chan_sip.c | |
parent | 0a2fff51c721c231ca254f4d80a3c2807d3176a0 (diff) |
Fix segfault
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-x | channels/chan_sip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ec20596e9..a912741a9 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5417,8 +5417,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, char *cmd strncpy(p->username, peer->username, sizeof(p->username) - 1); strncpy(p->authname, peer->username, sizeof(p->authname) - 1); } - if (!ast_strlen_zero(user->cid_num) && !ast_strlen_zero(p->cid_num)) { - strncpy(p->cid_num, user->cid_num, sizeof(p->cid_num) - 1); + if (!ast_strlen_zero(peer->cid_num) && !ast_strlen_zero(p->cid_num)) { + strncpy(p->cid_num, peer->cid_num, sizeof(p->cid_num) - 1); ast_shrink_phone_number(p->cid_num); } if (!ast_strlen_zero(peer->cid_name) && !ast_strlen_zero(p->cid_name)) |