<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6097">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pidf_eyebeam_body_supplement: Fix XML generation error<br><br>We are generating a text node <activities> content, when we should be<br>generating an element node.<br><br>ASTERISK~26659<br>Reported by: Abraham Liebsch<br><br>Change-Id: I6e5ad450f91106029fb30517b8c0ea0c2058c810<br>---<br>M res/res_pjsip_pidf_eyebeam_body_supplement.c<br>1 file changed, 6 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/97/6097/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_pidf_eyebeam_body_supplement.c b/res/res_pjsip_pidf_eyebeam_body_supplement.c<br>index a0f50fd..46eb59c 100644<br>--- a/res/res_pjsip_pidf_eyebeam_body_supplement.c<br>+++ b/res/res_pjsip_pidf_eyebeam_body_supplement.c<br>@@ -61,10 +61,13 @@<br>       if (pidfstate[0] != '-') {<br>            pj_xml_node *activities = ast_sip_presence_xml_create_node(pool, status, "ep:activities");<br>          size_t str_size = sizeof("ep:") + strlen(pidfstate);<br>+               char *act_str = ast_alloca(str_size);<br> <br>-             activities->content.ptr = pj_pool_alloc(pool, str_size);<br>-          activities->content.slen = pj_ansi_snprintf(activities->content.ptr, str_size,<br>-                         "ep:%s", pidfstate);<br>+               /* Safe */<br>+           strcpy(act_str, "ep:");<br>+            strcat(act_str, pidfstate);<br>+<br>+               ast_sip_presence_xml_create_node(pool, activities, act_str);<br>  }<br> <br>  ast_sip_presence_xml_create_attr(pool, node, XMLNS_PP, XMLNS_PERSON);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6097">change 6097</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/6097"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I6e5ad450f91106029fb30517b8c0ea0c2058c810 </div>
<div style="display:none"> Gerrit-Change-Number: 6097 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>