<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/bnotes/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/bnotes/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/bnotes/bugs/</id><updated>2022-06-16T14:49:31.856000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Bitstring error </title><link href="https://sourceforge.net/p/bnotes/bugs/45/" rel="alternate"/><published>2022-06-16T14:49:31.856000Z</published><updated>2022-06-16T14:49:31.856000Z</updated><author><name>prankul</name><uri>https://sourceforge.net/u/prankul/</uri></author><id>https://sourceforge.netcf0b0eb624b8a75dc6277f2c1d6ddd85776eb06d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;while setting a byte array of size 8 bits it encode succefully but while i am decoding same record it says out of bound in same bit string field  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Unable to compile ASN.1 Specification of ILL APDUs</title><link href="https://sourceforge.net/p/bnotes/bugs/44/" rel="alternate"/><published>2012-11-22T14:31:07Z</published><updated>2012-11-22T14:31:07Z</updated><author><name>Rustam T. Usmanov</name><uri>https://sourceforge.net/u/zxx/</uri></author><id>https://sourceforge.netb6377cd08c3b61523201b77a0b2156e374473c09</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;./bncompiler.sh  -m java -f ./ill9702.asn&lt;br /&gt;
BinaryNotes compiler v1.5.3&lt;br /&gt;
(c) 2006-2011 Abdulla G. Abdurakhmanov&lt;br /&gt;
Current directory: /home/rustam/tmp/jz&lt;br /&gt;
Compiling file: ./ill.asn&lt;br /&gt;
line 10:1: unexpected token: ILL-Request&lt;br /&gt;
line 11:1: unexpected token: Forward-Notification&lt;br /&gt;
line 12:1: unexpected token: Shipped&lt;br /&gt;
line 13:1: unexpected token: ILL-Answer&lt;br /&gt;
line 14:1: unexpected token: Conditional-Reply&lt;br /&gt;
line 15:1: unexpected token: Cancel&lt;br /&gt;
line 16:1: unexpected token: Cancel-Reply&lt;br /&gt;
line 17:1: unexpected token: Received&lt;br /&gt;
line 18:1: unexpected token: Recall&lt;br /&gt;
line 19:1: unexpected token: Returned&lt;br /&gt;
line 20:1: unexpected token: Checked-In&lt;br /&gt;
line 21:1: unexpected token: Overdue&lt;br /&gt;
line 22:1: unexpected token: Renew&lt;br /&gt;
line 23:1: unexpected token: Renew-Answer&lt;br /&gt;
line 24:1: unexpected token: Lost&lt;br /&gt;
line 25:1: unexpected token: Damaged&lt;br /&gt;
line 26:1: unexpected token: Message&lt;br /&gt;
line 27:1: unexpected token: Status-Query&lt;br /&gt;
line 28:1: unexpected token: Status-Or-Error-Report&lt;br /&gt;
line 29:1: unexpected token: Expired&lt;br /&gt;
line 730:9: unexpected token: GeneralString&lt;br /&gt;
line 733:9: unexpected token: EDIFACTString&lt;br /&gt;
line 1155:305: unexpected char: '%'&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Encode NULL fields (BER format)</title><link href="https://sourceforge.net/p/bnotes/bugs/43/" rel="alternate"/><published>2010-08-19T09:05:04Z</published><updated>2010-08-19T09:05:04Z</updated><author><name>alima</name><uri>https://sourceforge.net/u/elenaboncheva/</uri></author><id>https://sourceforge.nete4b309255852a1baf6cf6c3b72941c486894a95d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Probably there no necessity to encode NULL fields. I've changed BEREncoder method encodeNull&lt;br /&gt;
It works fine for me.&lt;/p&gt;
&lt;p&gt;public int encodeNull(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception {&lt;br /&gt;
int resultSize = 0;&lt;br /&gt;
return resultSize;&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>DecodeSequenceOf (BER format)</title><link href="https://sourceforge.net/p/bnotes/bugs/42/" rel="alternate"/><published>2010-08-19T08:54:04Z</published><updated>2010-08-19T08:54:04Z</updated><author><name>alima</name><uri>https://sourceforge.net/u/elenaboncheva/</uri></author><id>https://sourceforge.nete2ad14899aa88801531c05c6cab98c8afa8e80c7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've encountered such problem. When we have a structure SEQUENCE OF and its length is 128 Decoder can not decode properly. &lt;br /&gt;
I've found this in documentation on BER format.&lt;/p&gt;
&lt;p&gt;There are two ways of encoding lengths - the definite form, and the indefinite form. &lt;br /&gt;
For the definite form, if the length is less than 128, you just use a single byte, with the high bit set to zero. Otherwise the high bit is set to one, and the low seven bits set to the length of length. The length is then encoded in that many bytes. &lt;br /&gt;
The indefinite form is encoded by sending a length field with a length of length of 0 - i.e. [1000|0000]. The object is ended by sending two zero bytes.&lt;/p&gt;
&lt;p&gt;So if we have The indefinite form we don't know element's length, we should calculate it by finding a final two zero bytes.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>DecodeSequence, DecodeSet methods (BER format)</title><link href="https://sourceforge.net/p/bnotes/bugs/41/" rel="alternate"/><published>2010-08-19T08:38:20Z</published><updated>2010-08-19T08:38:20Z</updated><author><name>alima</name><uri>https://sourceforge.net/u/elenaboncheva/</uri></author><id>https://sourceforge.netc01b0050c12f0d22ae4e1542eb93dbf5547035b4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When we have to decode SEQUENCE or SET and there are fields with NULL values in the end of sequence (pic.1) we have problem with calculation of length of all structure. If we have NULL values in the beginning or in the middle of sequence - it OK (pic.2).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Class is set to UNIVERSAL compilation error</title><link href="https://sourceforge.net/p/bnotes/bugs/40/" rel="alternate"/><published>2010-08-19T07:47:07Z</published><updated>2010-08-19T07:47:07Z</updated><author><name>alima</name><uri>https://sourceforge.net/u/elenaboncheva/</uri></author><id>https://sourceforge.nete8d6258d242dd7b7ff637ad681ab543b75f95087</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If Class is set to Universal, e.g. [UNIVERSAL 16] &lt;/p&gt;
&lt;p&gt;CdrRecord ::= [PRIVATE 1] SEQUENCE &lt;br /&gt;
{&lt;br /&gt;
f1  [PRIVATE 70]        Type1      OPTIONAL,&lt;br /&gt;
f2  [UNIVERSAL 16]    Type2      OPTIONAL&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;After compilation of such structure we get &lt;br /&gt;
@ASN1Element ( name = "f2", isOptional =  true , hasTag =  true, tag = 16, &lt;br /&gt;
tagClass =  TagClass.ContextSpecific, hasDefaultValue =  false  )&lt;br /&gt;
But we should get&lt;br /&gt;
@ASN1Element ( name = "f2", isOptional =  true , hasTag =  true, tag = 16, &lt;br /&gt;
tagClass =  TagClass.Universal  , hasDefaultValue =  false  )&lt;/p&gt;
&lt;p&gt;This problem can be easily fixed in &lt;br /&gt;
modules/java/includes/tagClass.xsl&lt;br /&gt;
by adding a row &lt;br /&gt;
&amp;lt;xsl:when test="tag/clazz = 'UNIVERSAL'"&amp;gt; TagClass.Universal &amp;lt;/xsl:when&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;xsl:template name="tagClass"&amp;gt;&lt;br /&gt;
tagClass = &amp;lt;xsl:choose&amp;gt;&lt;br /&gt;
&amp;lt;xsl:when test="tag/clazz = 'APPLICATION'"&amp;gt; TagClass.Application &amp;lt;/xsl:when&amp;gt;&lt;br /&gt;
&amp;lt;xsl:when test="tag/clazz = 'PRIVATE'"&amp;gt; TagClass.Private &amp;lt;/xsl:when&amp;gt;&lt;br /&gt;
&amp;lt;xsl:when test="tag/clazz = 'UNIVERSAL'"&amp;gt; TagClass.Universal &amp;lt;/xsl:when&amp;gt;&lt;br /&gt;
&amp;lt;xsl:otherwise&amp;gt;TagClass.ContextSpecific&amp;lt;/xsl:otherwise&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:choose&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Java Constructor with type Long Paramater</title><link href="https://sourceforge.net/p/bnotes/bugs/39/" rel="alternate"/><published>2009-12-02T18:30:59Z</published><updated>2009-12-02T18:30:59Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netc461ef94749f0f48a2bfcd3e756a9160037d1879</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Example: &lt;/p&gt;
&lt;p&gt;Generated Class FooA has constructor FooA( Long someLongValue )&lt;/p&gt;
&lt;p&gt;Class FooB calls FooA constructor&lt;/p&gt;
&lt;p&gt;Expected Result:&lt;/p&gt;
&lt;p&gt;new FooA( 0L )&lt;/p&gt;
&lt;p&gt;Actual Behaviour:&lt;/p&gt;
&lt;p&gt;new FooA( 0 ) (Zero is seen as int not long)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Invalid size count</title><link href="https://sourceforge.net/p/bnotes/bugs/38/" rel="alternate"/><published>2009-09-01T22:56:36Z</published><updated>2009-09-01T22:56:36Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net4cb97f4ac799bfed404b46782b1ea5950b931d53</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Problem:&lt;br /&gt;
ASN.1 notation &lt;/p&gt;
&lt;p&gt;TestModule DEFINITIONS EXPLICIT TAGS::= &lt;br /&gt;
BEGIN&lt;br /&gt;
AttributeType ::= OBJECT IDENTIFIER&lt;br /&gt;
AttributeValue ::= PrintableString&lt;br /&gt;
Attribute ::= SEQUENCE {&lt;br /&gt;
type AttributeType, &lt;br /&gt;
values SET OF AttributeValue&lt;br /&gt;
} &lt;br /&gt;
SubjectDirectoryAttributes ::= SEQUENCE SIZE (1..MAX) OF Attribute&lt;br /&gt;
END&lt;/p&gt;
&lt;p&gt;gives error "size is incorrect".&lt;/p&gt;
&lt;p&gt;I inspected code and found problems in size tracking of tags, for example BERDecoder.java line 449&lt;br /&gt;
in my opinion must look like &lt;br /&gt;
return new DecodedObject&amp;lt;Object&amp;gt;((new ObjectIdentifier(dottedDecimal)), len.getValue());&lt;br /&gt;
an in source without len&lt;br /&gt;
return new DecodedObject&amp;lt;Object&amp;gt;((new ObjectIdentifier(dottedDecimal)));&lt;/p&gt;
&lt;p&gt;But this fix dosen't fixed framework.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>ASN.1 NULL problems</title><link href="https://sourceforge.net/p/bnotes/bugs/37/" rel="alternate"/><published>2009-08-24T21:18:13Z</published><updated>2009-08-24T21:18:13Z</updated><author><name>Michal Budzyn</name><uri>https://sourceforge.net/u/mibu75/</uri></author><id>https://sourceforge.neta715b66a6e79bc26548086951d20b64c6a60841d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;There are some issues considering the ASN.1 NULL encoding:&lt;br /&gt;
1.Generated class doesn't have setter/getter methods.&lt;br /&gt;
2.Optional clause is not respected, value is always encoded.&lt;br /&gt;
3.“05 00”H encoding is always. Implicit and  long tags are not considered. &lt;/p&gt;
&lt;p&gt;TestNull ::= SEQUENCE&lt;br /&gt;
{&lt;br /&gt;
boolValue      BOOLEAN,&lt;br /&gt;
nullVall  [33]  NULL OPTIONAL&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Wrong encoding of BitString (using PER/U-encoding)</title><link href="https://sourceforge.net/p/bnotes/bugs/36/" rel="alternate"/><published>2009-08-05T10:21:14Z</published><updated>2009-08-05T10:21:14Z</updated><author><name>jervi</name><uri>https://sourceforge.net/u/jervi/</uri></author><id>https://sourceforge.net0022507a4e40ac8aba61f8b162d2f523f6a7d86a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When encoding BitString using PER/U-encoding, the last byte is encoded wrong if trailBitsCnt != 0. Instead of encoding the bits that should be included, only the trailBits are encoded.&lt;br /&gt;
It can be fixed by fixing the for loop in org.bn.coders.per.PerAlignedEncoder encodeBitString(...). Add "8-" before "str.getTrailBitsCnt()". The fixed for-loop should read:&lt;/p&gt;
&lt;p&gt;for (int i = 0; i &amp;lt; 8-str.getTrailBitsCnt(); i++) {&lt;br /&gt;
int bitValue = (buffer[buffer.length - 1] &amp;gt;&amp;gt; (7 - i)) &amp;amp; 0x1;&lt;br /&gt;
bitStream.writeBit(bitValue);&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>