From: Mark Michelson Date: Tue, 15 Sep 2009 15:05:53 +0000 (+0000) Subject: Ensure that SDP read from TCP socket is null-terminated. X-Git-Tag: 11.0.0-beta1~4169 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=579919e831f53c596d0a1533a235bc936e34b8fc;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bd4653638a..789b1a7dca 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;