<p style="white-space: pre-wrap; word-wrap: break-word;">I tried to add some error checking now but I was not successful because of multiple reasons. The problem is how to detect the end of the bitstream. The input is octet aligned with padding bit at the end. So I can not just parse until the border of a release version and expect to get a -1 as return code when I parse one bit more (this would be the condition to detect the end).</p><p style="white-space: pre-wrap; word-wrap: break-word;">Some of the CSN.1 fields have a restriction on the values (must be != 0x00). I have now removed those checks below release 4 (there is only one). Now everything that fullfills more than Release 4 should parse. There is no comment in the spec about earlier releases. I assume that CM3 got introduced with release 4. I would suggest to keep it like this. We do not need to overcomplicate this.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21083">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/21083">change 21083</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/+/21083"/><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: Ic8b2bfd00330235f5bed00771e421588abfaac1f </div>
<div style="display:none"> Gerrit-Change-Number: 21083 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 09 Nov 2020 20:07:01 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>