<p>Matthew Fredrickson has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9201">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">menuselect/menuselect_curses: Resolves sprintf usage error<br><br>Acccording to the man page for sprintf, using the same buffer for<br>output as one used as an input yields undefined behavior.<br>This patch should work around this problem.<br><br>ASTERISK-27903<br>Reported-by: Alexander Traud<br><br>Change-Id: I2213dcb454aff26457e2e4cc9c6821276463ae3a<br>---<br>M menuselect/menuselect_curses.c<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/01/9201/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/menuselect/menuselect_curses.c b/menuselect/menuselect_curses.c<br>index 97f1f17..0917eba 100644<br>--- a/menuselect/menuselect_curses.c<br>+++ b/menuselect/menuselect_curses.c<br>@@ -227,7 +227,7 @@<br> buf[0] = '\0';<br> new_line = 1;<br> }<br>- sprintf(buf, "%s%*.*s%s", buf, new_line ? 0 : 1, new_line ? 0 : 1, " ", word);<br>+ sprintf(buf + strlen(buf), "%*.*s%s", new_line ? 0 : 1, new_line ? 0 : 1, " ", word);<br> new_line = 0;<br> }<br> if (strlen(buf)) {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9201">change 9201</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/9201"/><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: I2213dcb454aff26457e2e4cc9c6821276463ae3a </div>
<div style="display:none"> Gerrit-Change-Number: 9201 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Matthew Fredrickson <creslin@digium.com> </div>