<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7245">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_transport_websocket: Give transport semi-meaningful name<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, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/45/7245/1</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 b1f560c..e288270 100644<br>--- a/res/res_pjsip_transport_websocket.c<br>+++ b/res/res_pjsip_transport_websocket.c<br>@@ -218,7 +218,9 @@<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>+ newtransport->transport.info = (char *) pj_pool_alloc(newtransport->transport.pool,<br>+ strlen(newtransport->transport.obj_name) + 1);<br>+ strcpy(newtransport->transport.info, newtransport->transport.obj_name);<br> <br> newtransport->transport.dir = PJSIP_TP_DIR_INCOMING;<br> newtransport->transport.tpmgr = tpmgr;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7245">change 7245</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/7245"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I63d96ef8f7516ac02a0f91e22dfa8acdc615042c </div>
<div style="display:none"> Gerrit-Change-Number: 7245 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>