]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Ensure that SDP read from TCP socket is null-terminated.
authorMark Michelson <mmichelson@digium.com>
Tue, 15 Sep 2009 15:05:53 +0000 (15:05 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 15 Sep 2009 15:05:53 +0000 (15:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218504 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index bd4653638a0b38658da5094912bc905f3090e9d2..789b1a7dca11886648e7d1a25daaaa6c915f3757 100644 (file)
@@ -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;