summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-09-15 15:05:53 +0000
committerMark Michelson <mmichelson@digium.com>2009-09-15 15:05:53 +0000
commit579919e831f53c596d0a1533a235bc936e34b8fc (patch)
treedad74ffeb796c815d5147112556709903f189210 /channels
parent0381326442c58af8f20feebd3d545a036504b5c8 (diff)
Ensure that SDP read from TCP socket is null-terminated.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index bd4653638..789b1a7dc 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2967,6 +2967,7 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
ast_mutex_unlock(&tcptls_session->lock);
goto cleanup;
}
+ buf[sizeof(buf)-1] = '\0';
ast_mutex_unlock(&tcptls_session->lock);
if (me->stop)
goto cleanup;