<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7247">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_transport_websocket: Give transport a meaningful description<br><br>We were not \0 terminating this string, so any attempt to print it would<br>in the best case show an empty string and in the worst case potentially<br>crash.<br><br>Change-Id: I63d96ef8f7516ac02a0f91e22dfa8acdc615042c<br>---<br>M res/res_pjsip_transport_websocket.c<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_transport_websocket.c b/res/res_pjsip_transport_websocket.c<br>index b5b6a3e..3ce9039 100644<br>--- a/res/res_pjsip_transport_websocket.c<br>+++ b/res/res_pjsip_transport_websocket.c<br>@@ -203,6 +203,10 @@<br> ast_debug(4, "Creating websocket transport for %s:%s\n",<br> newtransport->transport.type_name, ws_addr_str);<br> <br>+ newtransport->transport.info = (char *) pj_pool_alloc(newtransport->transport.pool,<br>+ strlen(newtransport->transport.type_name) + strlen(ws_addr_str) + sizeof(" to "));<br>+ sprintf(newtransport->transport.info, "%s to %s", newtransport->transport.type_name, ws_addr_str);<br>+<br> pj_sockaddr_parse(pj_AF_UNSPEC(), 0, pj_cstr(&buf, ws_addr_str), &newtransport->transport.key.rem_addr);<br> if (newtransport->transport.key.rem_addr.addr.sa_family == pj_AF_INET6()) {<br> newtransport->transport.key.type = transport_type_wss_ipv6;<br>@@ -218,8 +222,6 @@<br> newtransport->transport.local_name.port = ast_sockaddr_port(ast_websocket_local_address(newtransport->ws_session));<br> <br> newtransport->transport.flag = pjsip_transport_get_flag_from_type((pjsip_transport_type_e)newtransport->transport.key.type);<br>- newtransport->transport.info = (char *)pj_pool_alloc(newtransport->transport.pool, 64);<br>-<br> newtransport->transport.dir = PJSIP_TP_DIR_INCOMING;<br> newtransport->transport.tpmgr = tpmgr;<br> newtransport->transport.send_msg = &ws_send_msg;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7247">change 7247</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7247"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I63d96ef8f7516ac02a0f91e22dfa8acdc615042c </div>
<div style="display:none"> Gerrit-Change-Number: 7247 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>