diff options
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | 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 fa9052dfa..40645214a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2208,7 +2208,7 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_serve ast_mutex_unlock(req.socket.lock); if (me->stop) goto cleanup; - strncat(req.data, buf, sizeof(req.data) - req.len); + strncat(req.data, buf, sizeof(req.data) - req.len - 1); req.len = strlen(req.data); } parse_copy(&reqcpy, &req); @@ -2223,7 +2223,7 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_serve if (me->stop) goto cleanup; cl -= strlen(buf); - strncat(req.data, buf, sizeof(req.data) - req.len); + strncat(req.data, buf, sizeof(req.data) - req.len - 1); req.len = strlen(req.data); } } |