<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15324">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: Fix truncation of persisted SUBSCRIBE packet<br><br>The last argument to ast_copy_string() is the buffer size, not the<br>number of characters, so we add 1 to avoid stamping out the final \n<br>in the persisted SUBSCRIBE message.<br><br>Change-Id: I019b78942836f57965299af15d173911fcead5b2<br>---<br>M res/res_pjsip_pubsub.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c</span><br><span>index cf8baea..dd08871 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -722,7 +722,7 @@</span><br><span> || type == SUBSCRIPTION_PERSISTENCE_RECREATED) {</span><br><span> if (rdata->msg_info.msg_buf) {</span><br><span> ast_copy_string(sub_tree->persistence->packet, rdata->msg_info.msg_buf,</span><br><span style="color: hsl(0, 100%, 40%);">- MIN(sizeof(sub_tree->persistence->packet), rdata->msg_info.len));</span><br><span style="color: hsl(120, 100%, 40%);">+ MIN(sizeof(sub_tree->persistence->packet), rdata->msg_info.len + 1));</span><br><span> } else {</span><br><span> ast_copy_string(sub_tree->persistence->packet, rdata->pkt_info.packet,</span><br><span> sizeof(sub_tree->persistence->packet));</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15324">change 15324</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/15324"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I019b78942836f57965299af15d173911fcead5b2 </div>
<div style="display:none"> Gerrit-Change-Number: 15324 </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: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>