From 41c332513f890b78d03261b686a187a2b3064c33 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 26 Jun 2009 20:48:29 +0000 Subject: [PATCH] Merged revisions 203779 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r203779 | russell | 2009-06-26 15:45:00 -0500 (Fri, 26 Jun 2009) | 5 lines 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/branches/1.6.1@203781 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5ea3f461e8..3135066915 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2405,6 +2405,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); -- 2.47.2