<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6748">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
Richard Mudgett: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_vpb: Fix a gcc 7 out-of-bounds complaint<br><br>chan_vpb was trying to use sizeof(*p->play_dtmf), where<br>p->play_dtmf is defined as char[16], to get the length of the array<br>but since p->play_dtmf is an actual array, sizeof(*p->play_dtmf)<br>returns the size of the first array element, which is 1. gcc7<br>validly complains because the context in which it's used could<br>cause an out-of-bounds condition.<br><br>Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba<br>---<br>M channels/chan_vpb.cc<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_vpb.cc b/channels/chan_vpb.cc<br>index d7e9732..6e77dc2 100644<br>--- a/channels/chan_vpb.cc<br>+++ b/channels/chan_vpb.cc<br>@@ -1791,7 +1791,7 @@<br> ast_verb(4, "%s: vpb_digit: asked to play digit[%s]\n", p->dev, s);<br> <br> ast_mutex_lock(&p->play_dtmf_lock);<br>- strncat(p->play_dtmf, s, sizeof(*p->play_dtmf) - strlen(p->play_dtmf) - 1);<br>+ strncat(p->play_dtmf, s, sizeof(p->play_dtmf) - strlen(p->play_dtmf) - 1);<br> ast_mutex_unlock(&p->play_dtmf_lock);<br> <br> ast_mutex_unlock(&p->lock);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6748">change 6748</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/6748"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba </div>
<div style="display:none"> Gerrit-Change-Number: 6748 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.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>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>