<p>dexter <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/11073">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">utils: fix encoding/decoding of IMSI value<br><br>When programming or reading a SIM with an IMSI shorter than 15, the IMSI<br>value is incorrectly encoded/decoded.<br><br>The code pads the the IMSI value with 0xF from the left but padding from<br>the right would be correct.<br><br>It also encodes the length as half the number of digits in the IMSI<br>(rounded up). This isn't correct for even length IMSIs. With even length<br>IMSIs, the odd/even parity bit bumps the last digit into an extra byte,<br>which should be counted as well.<br><br>- Fix endcoding of IMSI value<br>- Fix decoding of IMSI value<br><br>Change-Id: I9ae4ca4eb7c2965e601a7108843d052ff613beb9<br>Patch-by: Ben Foxmoore<br>Closes: SYS#3552<br>---<br>M pySim/utils.py<br>1 file changed, 26 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/73/11073/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/11073">change 11073</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/11073"/><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-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I9ae4ca4eb7c2965e601a7108843d052ff613beb9 </div>
<div style="display:none"> Gerrit-Change-Number: 11073 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>