diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-20 20:07:15 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-20 20:07:15 +0000 |
commit | e0b8e35cf317d7bd383a3f1a3c55f274037b1587 (patch) | |
tree | 5c5df3fd3c75831e052dce250fb0251cf4a80788 /channels/chan_sip.c | |
parent | 7cf9bf79653c952c68bf023499a4c8c2cf87813c (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@29092 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2a170b8f6..c2e1026c9 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11325,8 +11325,9 @@ static int sipsock_read(int *id, int fd, short events, void *ignore) } if (res == sizeof(req.data)) { ast_log(LOG_DEBUG, "Received packet exceeds buffer. Data is possibly lost\n"); - } - req.data[res] = '\0'; + req.data[sizeof(req.data) - 1] = '\0'; + } else + req.data[res] = '\0'; req.len = res; if(sip_debug_test_addr(&sin)) ast_set_flag(&req, SIP_PKT_DEBUG); |