ASN1C v6.6.x Change Log
The current production release version of ASN1C is 6.6.9, 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.6.9.1.
- Add check to fragmented length decode to ensure max of 64K returned as per spec. Included in v6.6.9.1.
- Fix possible security issues in the memory allocator for C and C++ (ASN-8544) (CVE-2016-5080).
- Fix possible memory allocation related security issues in the PER run-time for C and C++ (ASN-8469).
- Fix bug in Java and C# limited runtimes that don't include BER. For some licenses, the license check would consistently fail (ASN-8092).
The current production release version of ASN1C is 6.6.8, released on July 6, 2015. Changes in this release include the following:
- Fixed a bug in C/C++ BER decoding in which a zero-length BIT STRING was reported to be an error when it had named bits and a size constraint; see X.690/2008 8.6.2.4 (ASN-7779).
- Fixed a bug in the rtxStreamMemoryCreateWriter function in the C runtime library that caused the memory stream writer to dynamically create a buffer even when a backing byte array was used (ASN-7756).
- Fixed a bug in the C/C++ PER code generation that could occur when memory allocation failed while decoding optional elements enclosed in versioning brackets (ASN-7715).
- Fixed a bug in the C/C++ PER runtime that caused optimized runtime libraries to overwrite a single byte near a buffer boundary (ASN-7687).
- Fixed a bug in Java PER decoding in which extension elements that had CONTAINING types were improperly decoded (ASN-7675).
- Changed behavior of rtxStrncpy to always terminate destination buffers. Previously, if the source and destination buffers were the same size, rtxStrncpy would not terminate the destination; now it terminates the destination buffer and returns a null pointer (ASN-7596).
- 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).
- Fixed a crash that can occur when closing an unaligned PER open-type extension where the extension element aligns exactly at the end of the encoding buffer (ASN-7578).
- Fixed a bug in the C/C++ runtime that could cause hex strings to be improperly converted to ASCII. This impacts generated XML decoding logic for open types (ASN-7568).
- 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 C copy code generation for linked lists (i.e., SEQUENCE OF) of character arrays in which destinations were not properly allocated; addressed a bug in which arrays of character arrays were not properly copied. These issues should not affect newer versions of ASN1C (ASN-7126).
- Fixed a bug in copy code generation for C that caused some strings to be copied incorrectly when they were specified as character arrays (ASN-7064).
- Exported the
xu_fmt_tag2
function to allow users to call it for their own tag formatting purposes (ASN-6799). - Adjusted warnings for C/C++ code generation when an enumerated type prefix was specified by the user in a configuration file; no warning is printed when the name is changed (ASN-6799).
- Fixed a bug in C/C++ code generation that would cause the
extension of any C/C++ file to be replaced with either
.c
or.cpp
, even when users specified their own (ASN-6799). - 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). - Adjusted C/C++ code generation for OCTET STRING printing to ensure that the minimal number of octets would be printed when the octet string was sized (ASN-6738).
- 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 C/C++ copy code generation bug in which source and destination were confused for character arrays (ASN-6711).
- Fixed a rare corner case in C/C++ unaligned PER encoding in which the memory heap could be invalidated when encoding an unaligned field in such a way that it aligned directly on the last byte of the dynamic encoding buffer (ASN-6674).
- Fixed Java code generation for
SEQUENCE
types in cases where they incorporated extendedSEQUENCE
s viaCOMPONENTS OF
notation (ASN-6603).
ASN1C 6.6.7 was released on March 5, 2014. Changes in this release include the following:
- Updated several runtime functions in response to lint-checking warnings related to variable initializations (ASN-6337).
- Fixed a bug in C/C++ PER code generation in which an "OK" status
could be returned when decoding failed; this occurred when
–compact
was specified on the command line (ASN-6331). - Fixed a bug in C/C++ copy code generation that could cause corruption in character arrays (ASN-6328).
- Fixed a bug in C/C++ copy code generation in which a failed memory allocation was ignored (ASN-6312).
- Fixed a bug in the OSys low-level memory management that could cause a crash when verifying the integrity of allocated blocks (ASN-6251).
- Fixed a bug in C/C++ copy function generation in which array elements were referenced prior to a null check (ASN-6241).
- Fixed a bug in C XML code generation in which
SET
andSEQUENCE OF
size constraints were not being properly checked (ASN-6227).
ASN1C 6.6.6 was released on January 20, 2014. Changes in this release include the following:
- Fixed a bug in pure parser code generation that occurred when
–table-unions
was passed on the command-line. Only legacy table constraint code generation is supported with pure parsers (ASN-6146). - Fixed a bug in run-time key generation in which expiration information contained within a run-time key in the .lic file would be ignored in the generated run-time key (ASN-6118).
- Fixed a bug that could potentially cause a stack overflow exception in the C and C++ run-times (ASN-6019).
- Fixed a bug in C/C++ BER encoding of sequences where elements in extension groups would be encoded in the wrong order.
ASN1C 6.6.5 was released on October 18, 2013. Changes in this release include the following:
- Fixed a bug in C/C++ XML code generation in which the
<charArray>
configuration setting was causing compilation errors (ASN-5974). - Updated runtime distributions to include error module sources so that more descriptive error handling could be enabled by users (ASN-5966).
- Updated code generation for C to remove an errant C++-style comment from memory free code (ASN-5955).
- Fixed a bug with C/C++ PER code generation that would cause
extension groups to improperly decode when
–compat
was specified on the command-line (ASN-5932). - Updated C/C++ code generation to accommodate cases when
–dynamicArray
and–strict-size
were used together on the command line (ASN-5903). - Updated usage to disable the use of fully-qualified enumerations
(
–fqenum
) with legacy table constraint code generation (–tables
) since the two items are incompatible (ASN-5901). - Fixed a bug in the ASN1C GUI that caused it to cut off some lines at the bottom of the Function Options tab. The window had to be expanded manually to see the lines (ASN-5894).
- Fixed a bug in the Visual Studio 2005 C and C++ libraries that would cause linker warnings to be generated when code was linked against them (ASN-5892).
- Fixed a bug that would cause compiler warnings to be displayed in some cases when generated C++ code that contained calls to the OSRTMIN macro was compiled (ASN-5887).
- Fixed a bug in C/C++ PER code generation that could cause a crash
when invalid PER messages were decoded and the
–dynamicArray
option was used (ASN-5881). - Fixed a bug in C++ code generation that could cause a crash when
invalid messages were decoded and the
–dynamicArray
option was used (ASN-5881). - Fixed a bug in C/C++ PER code generation when the
array
storage option was selected. If array was static, elements were not always properly initialized prior to decoding (ASN-5840).
ASN1C 6.6.4 was released on August 23, 2013. Changes in this release include the following:
- Fixed a bug in C/C++ PER code generation when the
array
storage option was selected. In cases where length ranges were exactly 256, byte alignment was not being performed on decode (ASN-5840). - Fixed a bug that would cause a "Can't read license data" error on some non-Windows systems if the asn1c binary was found within one of the directories in the PATH (ASN-5794).
- Fixed a bug in the Java and C# run-times that would sometimes cause them to erroneously prevent generated code from executing after 30 days if the code or an rtkey.dat file was generated in a floating license server environment (ASN-5783).
- Fixed a bug in PER C/C++ code generation that could cause a crash when event handlers were used with badly formed dynamic octet strings (ASN-5772).
- Fixed a bug in BER C code generation that could cause bad error
handler invocations for
CHOICE
types when–stream
and–events
were specified on the command-line (ASN-5752). - Fixed a bug in C/C++ code generation that could cause improper decoding and test data for character arrays (ASN-5747).
- Fixed a bug in Java code generation where constraint checks were
not generated. This would occur in certain cases where the root
element set spec of the constraint was extensible, but the constraint
itself was not extensible or else did not have an additional element
set spec. For example,
OCTET STRING (SIZE(0..10,...,40..50))
. Some other conditions also needed to hold in order for the constraint check to not be generated as expected (ASN-5682). - Fixed a bug in the expansion of COMPONENTS OF where the generated code for the parent sequence type did not reflect the COMPONENTS OF component (ASN-5682).
- Addressed warnings related to the use of the DEC_BIT macro in C/C++ PER code generation (ASN-5452).
- Fixed handling of min/max XSD facets for xs:float/xs:double so that constraints will be properly generated (ASN-5815).
ASN1C 6.6.3 was released on June 21, 2013. Changes in this release include the following:
- Fixed a warning in C/C++ code generation when encoding constrained character strings with lower-bounds of zero (ASN-5675).
- Fixed several compilation errors for generated C/C++ copy and compare functions when working with character arrays (ASN-5675, ASN-5655).
- Fixed a bug in C/C++ code generation that could cause a crash when decoding messages with default values (ASN-5667).
- Fixed a bug in Java PER code generation that caused invalid calls
to
invokeCharacters
for enumerated types that were renamed to avoid conflicts (ASN-5637). - Fixed an issue that caused multi-threaded libraries for Visual C++ 6 not to be built and included in kits (ASN-5614).
- Fixed an issue that caused the ASN1C compiler not to return an error status to the operating system if the license check failed (ASN-5607).
- Fixed an issue in JSON code generation across all languages that would yield invalid JSON encodings for the first element if it was optional (ASN-5585).
- Fixed a C/C++ JSON code generation issue that could cause excessive memory use with some specifications (ASN-5570).
- Fixed a bug in C++ JSON code generation in which
EncodeTo
andDecodeTo
methods would be generated with calls to underlying C functions that were split over two lines (ASN-5569). - Fixed an issue in C/C++ code generation that could cause character arrays to be sized inappropriately (ASN-5566).
- Fixed an issue in C/C++ code generation that could cause improper type definitions to be created for character arrays (ASN-5566).
- Adjusted code generation for time types so that they could be
assigned the
chararray
ctype in a configuration file (ASN-5566). - Modified C/C++ PER error handling to return a 'not supported' error in the case of an open type value with fragmented length. Code needs to be generated with a different option (-perindef instead of -per) to add support for this case due to the inefficiencies involved in handling it (ASN-5547).
- Fixed 3GPP L3 message checking of inner lengths on decode to make sure all lengths were consistent.
- Fixed an error in the ASN.1 definition of RP-DATA in SMS messages (TS 24.011) in which zero-length originating or destination length placeholders were not being accounted for.
- Corrected a problem with the encoding of XSD QName values in C# code generated from .xsd files (ASN-5532, ASN-5531).
- Fixed C/C++ XML encoders generated from XSD to encode an xsi:type attribute when required (ASN-5511).
- Fixed C/C++ XML decoders generated from XSD using the -lax option to not apply lax handling for sequence groups. This led to reporting valid elements (from subsequent groups) as invalid (ASN-5555).
- Fix XML encoding generated from XSD to ensure that qualified attributes appear in a namespace and that the namespace prefix is declared. This affects all target languages.
- Fix C XML decoding generated from XSD to ensure that it recognizes all namespaces. In some cases, decoders would fail because a namespace was not recognized.
- Fix a bug in C XML decoders whereby simply having a namespace declaration would cause a false error report.
- Fix a bug in XML encoding whereby unqualified attributes were encoded with a namespace prefix, thus incorrectly putting them in a namespace (internal and also ASN-5554).
- Changed the DecodeXML() method (and the DecodeXER() method) in the XBSimpleType class in the C# run-time so it re-throws any exceptions as Asn1Exception instances (ASN-5533).
- Fixed a bug in C/C++ PER code generation to ensure that presence flags would not be set until after the data were properly decoded (ASN-5495).
- Added capability to generate long names again, using -compat with a version less than 6.6.0 (ASN-5633).
- Fixed a bug that would cause warning messages to be displayed when linking against some of the libraries in the C and C++ run-times on Windows systems (ASN-5317).
- Fixed a bug where the PER encoding and decoding of extension additions for a sequence were not handled correctly if the number of extension additions exceeded 64. The number of extension additions was not correctly encoded/decoded. This affected C, C++, C#, and Java. ASN-5650.
- 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.
ASN1C 6.6.2 was released on April 29, 2013. Changes in this release include the following:
- Fixed a bug that could cause C and C++ code generated for JSON to have if->else if blocks that were too long for some compilers.
- Fixed a bug that caused some function names generated for JSON functions not to include a type prefix defined in a configuration file when the type prefix should have been included in the function name.
- Fixed a bug in which generated calls to the function rtJsonAsn1DecOIDValue() were not saving the function's return value in a variable.
- Fixed a bug in ASN.1 pretty-print and HTML generation in which the named constraint part of a WITH COMPONENTS constraint would have the wrong name.
- Fixed a bug in decoding the 3GPP TS 24.008 Quality of Service (QoS) IE in which extension bit rates were being handled as a group rather than individually.
- Fixed bug in definition of 3GPP TS 24.008 Attach Accept message in which Attach Result and Force to Standby fields were in wrong order and Radio Priority for SMS and TOM8 were in wrong order.
- Fixed bug in definition of 3GPP TS 24.008 GPRS Timer 2 IE type. Length field was missing.
- Fixed bug in decoding 3GPP TS 24.008 call control and session management L3 headers in which wrong condition was being checked for presence of extended transaction ID.
- Fixed a bug in Java code generation that produced improper calls to string validation functions when generating XER decoders (ASN-5488).
- Adjusted code generation for BIT STRINGs that CONTAIN other types so that they would not be padded to the next octet. This follows Technical Corrigendum 2 to X.691 from 04/2012 (ASN-5383).
- Fixed XSD generation from ASN.1 for XER encoding of INTEGER with named numbers (ASN-5380).
- Fixed a bug that prevented users of the ASN1C GUI tool from opening more than one project in a single run (ASN-5376).
- Fixed use of Authentication Response paramater in LTE NAS message. Version from TS 24.008 was being used rather than updated version in TS 24.301 (ASN-5370).
- Fixed a possible buffer underflow in the common runtime library (ASN-5363).
- Added missing IMEI choice alternative to LTE NAS EPSMobileIdentity definition (ASN-5362).
- Updated license error reporting in ASN1C GUI (ASN-5360).
- Fixed order of requestType and PDNType in LTE NAS PDN Connectivity Request message (ASN-5359).
- Restored XML Encode methods to C# runtime class Asn1Type and interface Asn1TypeIF, based on customer request (ASN-5356).
- Fixed a bug in generated C copy functions for
BIT STRING
that confused the source and destination number of bits (ASN-5348). - Adjusted code generation to help prevent unused variable warnings
that can appear when using
gcc
(ASN-5346). - Fixed gcc warnings in generated C/C++ PER code for the LTE S1AP and X2AP ASN.1 specifications (ASN-5345).
- Fixed a problem in which invalid directories might be added to the compiler-generated include paths (ASN-5344).
- Added generation of helper methods to assign values based on table constraints for C++ (ASN-5312).
- Enhanced integer constraint checking for 3GPP Layer 3 generated code (ASN-5311).
- Fixed a problem with generated Visual Studio projects not instructing Visual Studio to generate a .lib file if -genmakedll was specified on the ASN1C command line (ASN-5189).
- 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 and error reporting (ASN-5458).
- Fixed a bug in C/C++ PER print code generation for optional elements. (ASN-5765)
ASN1C 6.6.1 was released on March 8, 2013. Changes in this release include the following:
- Refactored 3G NAS code so that it could be built from ASN.1 source rather than pre-built as part of the core package.
- Removed the deprecated
–tables
option from the GUI. Users can add this for C/C++ manually if needed (ASN-5177). - Fixed a bug in Java/C# decoding of an empty string for a constrained UTF8String type which caused an exception (ASN-5222).
ASN1C 6.6.0 was released on January 15, 2013. New features in this release include the following:
- Capability to Encode/Decode Data in JSON Format.
- Capability to Encode/Decode 3GPP Layer 3 Messages.
- Open Source Version of C BER/DER Run-time.
- Capability to Embed Configuration Directives in ASN.1 Comments.
- Addition of ASN.1 Comments and Type Definitions in C/C++ Header Files.
- More Efficient Table Constraint Index Handling
- Option to Directly Use Enumerated Types in C/C++ Code
- Added run-time libraries add-on package for Windows built with Visual Studio 2012.
Related links: