summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2009-06-26 20:45:00 +0000
committerRussell Bryant <russell@russellbryant.com>2009-06-26 20:45:00 +0000
commit92f0cdfce7131988eef38fc9533db1e33fd23bc0 (patch)
tree39af04687f786aa13945a996521faeaab6a6d9c9 /channels/chan_sip.c
parent48f7381af038934ab14cffa25ccbf6e86d5f83ef (diff)
Ensure the TCP read buffer is fully initialized before handling each packet.
(closes issue #14452) Reported by: umberto71 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index a49b6ce75..0ab125173 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2903,6 +2903,8 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
reqcpy.data = str_save;
ast_str_reset(reqcpy.data);
+ memset(buf, 0, sizeof(buf));
+
if (tcptls_session->ssl) {
set_socket_transport(&req.socket, SIP_TRANSPORT_TLS);
req.socket.port = htons(ourport_tls);