From: Russell Bryant Date: Fri, 26 Jun 2009 20:45:00 +0000 (+0000) Subject: Ensure the TCP read buffer is fully initialized before handling each packet. X-Git-Tag: 11.0.0-beta1~4588 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92f0cdfce7131988eef38fc9533db1e33fd23bc0;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a49b6ce750..0ab1251737 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);