<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/19424">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: Don't match negative values on purely positive ranges<br><br>Without this patch, for instance having a range 0-ULONG_MAX would match<br>if someones types value -3, which would be converted to unsigned but<br>that's clearly what is expected here from user point of view.<br><br>Change-Id: Ia95f6314a2dd3f94d21fc219cf69bb8d39b8e7f0<br>---<br>M src/vty/command.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/19424/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/vty/command.c b/src/vty/command.c</span><br><span>index cc52c14..7522c1d 100644</span><br><span>--- a/src/vty/command.c</span><br><span>+++ b/src/vty/command.c</span><br><span>@@ -1309,6 +1309,9 @@</span><br><span>       } else {</span><br><span>             unsigned long min, max, val;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+              if (str[0] == '-')</span><br><span style="color: hsl(120, 100%, 40%);">+                    return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>          val = strtoul(str, &endptr, 0);</span><br><span>          if (*endptr != '\0')</span><br><span>                         return 0;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/19424">change 19424</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/c/libosmocore/+/19424"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia95f6314a2dd3f94d21fc219cf69bb8d39b8e7f0 </div>
<div style="display:none"> Gerrit-Change-Number: 19424 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>