<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18182">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">conversions.c: Specify that we only want to parse decimal numbers.<br><br>Passing 0 as the last argument to strtoimax() or strtoumax() causes<br>octal and hexadecimal to be accepted which was not originally<br>intended. So we now force to only accept decimal.<br><br>ASTERISK-29950 #close<br><br>Change-Id: I93baf0f273441e8280354630a463df263a8c0edd<br>---<br>M main/conversions.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/18182/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/conversions.c b/main/conversions.c</span><br><span>index 007e24d..4b58140 100644</span><br><span>--- a/main/conversions.c</span><br><span>+++ b/main/conversions.c</span><br><span>@@ -99,7 +99,7 @@</span><br><span> }</span><br><span> </span><br><span> errno = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- val = strtoimax(str, &end, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ val = strtoimax(str, &end, 10);</span><br><span> </span><br><span> /*</span><br><span> * If str equals end then no digits were found. If end is not pointing to</span><br><span>@@ -126,7 +126,7 @@</span><br><span> }</span><br><span> </span><br><span> errno = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- val = strtoumax(str, &end, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ val = strtoumax(str, &end, 10);</span><br><span> </span><br><span> /*</span><br><span> * If str equals end then no digits were found. If end is not pointing to</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18182">change 18182</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/+/18182"/><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: I93baf0f273441e8280354630a463df263a8c0edd </div>
<div style="display:none"> Gerrit-Change-Number: 18182 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>