ASN1C v6.5.x Change Log
The current production release version of ASN1C is 6.5.7, released on . Changes in this release include the following:
- Fix possible integer overflow prior to a memory allocation in the PER run-time (ASN-8679). Included in v6.5.9.1.
- Add check to fragmented length decode to ensure max of 64K returned as per spec. Included in v6.5.9.1.
- Fix possible security issues in the memory allocator for C and C++ (ASN-8544) (CVE-2016-5080).
- Fixed a bug in the Java PER runtime in which fragmented octet strings aligned on a 16k boundary did not have the proper padding byte written (ASN-7587).
- Fix issue in the generation of XSD for REAL type elements, following ObjSys proprietary XML encoding rules. The fix was to add generation of minInclusive/maxInclusive facets when appropriate (ASN-7563).
- Removed an isolated use of sprintf in the ASN.1 common runtime for printing bit strings to character strings (ASN-7467).
- Added support for fragmented PER messages to Java. Use –perindef on the command line to add support for these messages (ASN-7465).
- Fixed a bug in Java code generation in which CHOICE elements were not properly qualified when –strict was passed on the command line. This only affects string validation and will not affect users that do not use strict constraint checks (ASN-7418).
- Fixed a bug in BER C/C++ code generation in which invalid enumeration values would be decoded without error (ASN-7400).
- Fixed a bug in Java's
Asn1BitString
that caused empty bit string comparisons to returnfalse
when in fact the bit strings were equal (ASN-6764).
The current production release version of ASN1C is 6.5.6, released on March 10, 2014. Changes in this release include the following:
- Fixed a bug in
rtxEncBit
so that all non-zero values passed to it would be treated asTRUE
. Some calls from legacy code were causingFALSE
to be encoded instead (ASN-6723). - Fixed a bug in C/C++ copy code generation that could cause corruption in character arrays (ASN-6328).
- Fixed a bug in C/C++ XML code generation that caused compilation
errors when using the
<chararray>
configuration file predicate (ASN-5974). - Corrected an issue preventing XER/XML decoders from applying default values when a value is not explicitly provided (ASN-5848).
- Fixed a bug in C PER decode code generation in which the wrong number of bits were being decoded in the unaligned case for lengths greater than 256 and less than 64K (ASN-4954).
- Made a change for Java and C# code generation to not generate code for character event handling unless -events is specified. Start and end element handling is still generated, unless either -compact or -noevents is specified, as those events are used for element tracking & error reporting (ASN-5458).
- Fixed a bug in PER encoding of semi-constrained integers for C and C++. Certain values were encoded with a length one greater than the number of bytes actually encoded.
The current production release version of ASN1C is 6.5.5, released on November 13, 2012. Changes in this release include the following:
- Updated memory management routines to perform additional error checking (ASN-4954).
- Fixed an array index out of bounds exception that could occur when using named bit strings with generated Java code (ASN-4899).
- Fixed a potential crash and invalid code generation that was occurring in the case of inline OCTET STRING definitions in C++.
- Fixed C code generation when
–table-unions
was specified with–prtfmt details
; a name buffer was specified twice (ASN-4873). - Fixed a C PER decoding issue that was caused when using the
list
predicate for storage in a configuration file (ASN-4804). - Fixed a problem that caused DLLs in the lib folder of Windows kits to specify the wrong version of the C run-time in their manifests (ASN-4796).
- Updated print to string sources to remove warnings in source code packages (ASN-4783).
- Fixed a problem related to the
<enumPrefix>
predicate that could cause name clashes with some enumerated identifiers (ASN-4765). - Fixed a bug in which filenames could be truncated when the
current working directory was specified as the output directory
(
-O .
) and–maxlines
was passed on the command-line (ASN-4654).
ASN1C 6.5.4 was released on September 5, 2012. Changes in this release include the following:
- Updated C/C++ code generation to prevent the header guard prefix
from attaching to
rtkey.h
files. This permits the generation and integration of multiple modules without duplicating the key value across the global name table (ASN-4765). - Updated C/C++ PER code generation to prevent harmless Valgrind
warnings about freeing uninitialized memory; our memory management
handles this situation safely. The Valgrind warnings arise when
decoded lengths exceed the acceptable size of an array
(
RTERR_TOOBIG
) (ASN-4748). - Updated Java PER bit tracing for
Asn1Real
types so that the length, format, and exponent values would be explicitly reported (ASN-4744). - Corrected an issue in which a large negative numeric literal would sometimes appear in generated C or C++ code and would cause compilation to fail (ASN-4738).
- Corrected an issue in which macros intended to designate values as 64-bit values were improperly used in generated C or C++ code (ASN-4738).
- Updated Java code generation so that complex types would not be
improperly initialized if they were part of a
CHOICE
(ASN-4728). - Updated the Java
Asn1BerDecodeContext
class so that it would better track tags seen during decoding. This helps to avoid conflicts with default elements (ASN-4728). - When linking code against the 32-bit Visual Studio 2010 libraries, "missing PDB file" warning messages are displayed. (ASN-4690).
- When compiling XSD and generating a C XML decoder for an element having a fixed number of occurrences (greater than one), the generated code contained an error that prevented compilation. A value was assigned to the non-existent field "n". (ASN-4660).
- Fixed several warnings that would appear when using the
–W4
option with Visual C/C++ (ASN-4654). - When generating C# code with table constraints, some generated files weren't included in a generated makefile or .csproj file. (ASN-4638).
- Fixed a problem that could cause an exception during execution of generated memory deallocation code (ASN-4609).
- Fixed defects in generated BER encoders and decoders. These would arise, when compiling XSD, in the case of a sequence whose content is a single element E, where E's type is itself a sequence whose content is a single element. The C/C++ BER encoder encoded a BER tag in primitive form when the correct form was constructed. The C/C++/Java/C# BER decoders would report unexpected tag errors on a correct encoding (ASN-4670).
- Fixed a bug in license validation in the ASN1C GUI that could force users to open the GUI twice in order to open or create new projects (ASN-4560).
- Fixed a defect in generated C# BER decoders where the tag for a sequence-of's element was not being matched, leaving the tag to be treated as part of the contents of the repeating element. This occurred when the sequence-of was inlined and was the alternative type for a choice type.
- Added -noevents to provide a way to disable event handler code generation for Java and C#, where it is otherwise done by default (ASN-4726).
ASN1C 6.5.3 was released on July 9, 2012. Changes in this release include the following:
- Fixed a potential stack overflow caused by mutual recursion when
encoding
OCTET STRINGS
with size constraints exceeding 64k in the Java and C# runtime libraries (ASN-4648). - Fixed a potential memory corruption in the C/C++ runtime that could occur when explicitly requesting a memory reallocation that would transform the pointer from a managed block to a raw block (ASN-4629).
- Addressed some behaviors of the Java Runtime (ASN-4626):
-
- Fixed a number of
NullPointerException
s that could be generated when checking the hash codes of different types in the Java runtime. - Adjusted the creation of
Asn1Time
classes to throw an exception when passing in an invalid time string. An invalid format exception was usually thrown after the time class was used, not when it was created. - Updated the
Asn1Time
documentation to explain that uninitialized time objects were not considered equal.
- Fixed a number of
- Fixed a bug in copy code that could cause memory corruption when
copying
OCTET STRING
s (ASN-4606). - Fixed a bug in which ASN1C would sometimes incorrectly report missing definitions in a module (ASN-4598).
- Fixed a few sample ASN.1 modules that were missing definitions (ASN-4598).
- Updated comparisons with
OSNULLINDEX
to remove a spurious warning about comparisons with unsigned integers (ASN-4595). - Fixed a warning about code that included
OSRTStreamIF.h
(ASN-4595). - Updated Java
Asn1Enumerated
classes to prevent race conditions in multi-threaded environments and to protect member variables from unwitting modification (ASN-4573). - Fixed several different issues with Java code generation and the runtime (ASN-4550):
-
- Corrected several
NullPointerException
failures when callingequals()
methods. - Corrected inconsistent behavior of
equals()
inAsn1Time
subclasses. - Corrected
validate
methods for numeric and IA5 string types. - Added
equals()
methods for EXTERNAL types. - Ensured consistency for
hashCode()
methods.
- Corrected several
- Fixed a warning when compiling code that included
ASN1CBitStr.h
(ASN-4542). - Fixed a bug in which imported object identifiers whose arc names were C/C++ reserved keywords would be improperly resolved by the compiler (ASN-4523).
- Fixed a problem with printing warnings to the standard output
when
–warnings
was used on the command-line (ASN-4519). - Fixed an exception that could occur when the GetTime() method of the C# Asn1UTCTime class was called (ASN-4514).
- No longer report "XML element with more than 1 explicit tag" errors when generating code from XSD. This was an internal limitation that has been lifted (ASN-4504).
- Ensured that errors would be reported to standard out as well as in the output file when permitted alphabet constraints contain characters that are not a part of the canonical set (ASN-4497).
- Fixed a possible use-after-free error that appears in the C common runtime after attempting to decode a message populated with random data; this can occur when initialization functions are explicitly disabled (ASN-4494).
- Fixed generation of XSD from ASN.1. When generating XSD, given a TypeAssignment such as MyTypeAlias ::= MyType where MyType is a sequence of integer, the xsd type generated for MyTypeAlias should be a simpleType, not a complexType, because it is defined as an xsd:restriction on MyType, which is a simple type (ASN-4451).
- Fixed a bug in which C/C++ PER encoders were not adding a trailing length determinant when encoding octet strings whose size was an exact multiple of 16k (ASN-4435).
- Fixed a bug in C/C++ compact PER decoding in which dynamic octet
strings for
CONTAINING
types were not properly returning an error status when an error occurred (ASN-4431). - Added support for
REAL
value range constraint checks that use simple values (e.g., 1.5) as range end points (ASN-4408). - Added
Asn1SeekableStream
to C# runtime library. This internal class supports seeking on streams that do not usually support it, such asNetworkStream
s (ASN-4359). - Fixed a bug in C/C++ test code generation in which the correct type for a table-constrained open type element was not always selected (ASN-4088).
- Fixed handling of XSD date and time types when generating code from XSD or when compiling ASN.1 that uses the corresponding types defined by X.694 in the XSD module. The old behavior treated these types as ASN.1 TIME subtypes which have different BER/PER encodings than called for by X.694.
- Changed the ASN1C compiler so a status of -1 is returned to the operating system when the compiler binary terminates if syntax errors are detected in a module. Previously, the compiler binary would return 0 in such situations.
ASN1C 6.5.2 was released on April 30, 2012. Changes in this release include the following:
- Fixed a bug in which using
–o
and–maxlines
together could cause header files to be overwritten (ASN-4407). - Fixed a bug with C/C++ PER decoding in which fixed-length
SEQUENCE OF
types would be improperly decoded (ASN-4382). - Fixed a possible crash in the construction of C++ bit strings when they were used as PDU data types (ASN-4373).
- Updated
rtxPrintToStream
functions so that global print streams would properly indent. Global print streams are not thread safe; context-specific streams are recommended in their place (ASN-4362). - Updated the
Asn1BerDecodeBuffer
class in the C# runtime to ensure that underlying streams that did not supportSeek
would still decode properly (ASN-4359). - Changed
–noAmbigTag
option to–allow-ambig-tags
. References to the old option will still work (ASN-4352). - Updated Java exceptions so that they would extend
RuntimeException
, making them unchecked. This helps to facilitate upgrades from older versions (ASN-4351). - Fixed a problem with casing of the root element when compiling XSD. In some cases, the element name would be capitalized when it should have been uncapitalized (ASN-4342).
- Added the generation of default value assignments for
REAL
types for all languages in ASN1C. This was causing a bug in PER decoding (ASN-4293). - Updated the character string
equals
methods to test the types of the strings, returningfalse
if the types are different. Previously, for example, anAsn1PrintableString
andAsn1NumericString
would be considered equal if they had the same string representation (ASN-4290). - Added
hashCode
methods to all types in the Java run time that inherit fromAsn1Type
. Java code generation was changed to generate ahashCode
method forSEQUENCE/OF
andSET/OF
types when–equals
was specified on the command-line (ASN-4290). - Fixed a problem in the Java / C# code generation that could cause
decoding errors when reading named, sized
BIT STRING
s (ASN-4260).
ASN1C 6.5.1 was released on March 7, 2012. Changes in this release include the following:
- A complete Windows 64-bit (x64) distribution is now available containing both compiler and run-time libraries built in 64-bit mode.
- Support for Extended-XER ATTRIBUTE and BASE64 instructions added.
- XER support for C/C++ has been changed to use the same run-time library as XML. XER/XML format can now be switched via a run-time switch. Support for SAX-based XER as existed previously is now considered deprecated.
- Fixed an issue with floating license checking in which the both the GUI and command-line executable occupied a slot thus providing an incorrect concurrent license usage count.
- Resolved a stack corruption in Solaris Forte libraries when attempting to create a control class for a PDU; this affected non-optimized libraries only (ASN-4167).
IA5String
validation in Java adjusted to fail if the ASCII value was greater than 127 (0x7E) per ITU-T T.50 (ASN-4201).- Fixed a bug in C code generation that could cause invalid print-to-stream functions to be generated when compiling an XSD (ASN-4184).
- Updated Java code generation to add string validation to
production types, not just elements within
SEQUENCE
s (ASN-4097). - Fixed a test-code generation failure when
EXTERNAL
types were used inside ofCHOICE
s, as in ANSI TCAP (ASN-4087). - Fixed an error in writer and reader generation when an
EXTERNAL
type was incorrectly selected as a PDU (ASN-4087). - The debug run-time C and C++ DLLs for Visual Studio 2008 and Visual Studio 2010 in Windows kits are now provided as files with names ending in d (e.g., asn1berd.dll) in addition to files with names not having the d (e.g., asn1ber.dll) that were used previously. The next major release of ASN1C will just provide the files with names ending in d for these two platforms. (ASN-4079).
ASN1C 6.5.0 was released on January 20, 2012. New features in this release include the following:
- Use of Visual Studio 2008 as Default Compiler on Windows.
- Addition of a Visual Studio Plug-in for Windows.
- Improved Support for Android.
- Ability to Generate C# Project Files.
- C/C++ Code Generation Changes for Optimal Size Constraint Handling<.
- Deferred Decoding in Java/C#.
- Real-time Random Test Code Generation in C/C++.
- Partial Extended XER (E-XER) Support.