<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6749">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/49/6749/1</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/6749">change 6749</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/6749"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba </div>
<div style="display:none"> Gerrit-Change-Number: 6749 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>