<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/26083">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">commands: return none, when offset exceeds file length<br><br>The computed length of the file may be negative, when the offset exceeds<br>the file length. When this is the case, return none<br><br>Change-Id: I2c017c620254fae188022851ef3b670730aab503<br>---<br>M pySim/commands.py<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/pysim refs/changes/83/26083/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/commands.py b/pySim/commands.py</span><br><span>index 1fd1f61..347b821 100644</span><br><span>--- a/pySim/commands.py</span><br><span>+++ b/pySim/commands.py</span><br><span>@@ -140,6 +140,9 @@</span><br><span>                        return (None, None)</span><br><span>          if length is None:</span><br><span>                   length = self.__len(r) - offset</span><br><span style="color: hsl(120, 100%, 40%);">+               if length < 0:</span><br><span style="color: hsl(120, 100%, 40%);">+                     return (None, None)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                total_data = ''</span><br><span>              chunk_offset = 0</span><br><span>             while chunk_offset < length:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/26083">change 26083</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/pysim/+/26083"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2c017c620254fae188022851ef3b670730aab503 </div>
<div style="display:none"> Gerrit-Change-Number: 26083 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>