Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ACN checks for post-encoding/decoding attributes #264

Open
escmmo opened this issue May 11, 2023 · 0 comments
Open

Missing ACN checks for post-encoding/decoding attributes #264

escmmo opened this issue May 11, 2023 · 0 comments

Comments

@escmmo
Copy link

escmmo commented May 11, 2023

asn1scc version 4.5.0.4
Consider the following ASN.1 definition:

T-TYPE ::= SEQUENCE
{
    field1 INTEGER,
    field2 INTEGER
}

The case seems to be that in order to use post-encoding-function or post-decoding-validator ACN attributes, one has not only to use both, but there must exist at least one NULL component with the save-position attribute. While this is acceptable, any of the following ACN cases do not produce asn1scc compiler errors (and probably should?) but will fail source code compilation for missing types or declarations:

T-TYPE [post-decoding-validator someDecodeFunction]

Fails on T_TYPE_ACN_Decode() due to a missing declaration for type T_TYPE_extension_function_positions.

T-TYPE [post-decoding-validator someDecodeFunction]
{
    field1 [],
    field2 [],
    insertedField NULL [save-position, pattern '0000'H]
}

Fails on T_TYPE_ACN_Encode() due to unknown bitStreamPositions_1 variable.

Similarly, if one instead uses post-encoding-function only, equivalent errors occur in the counterpart ACN_Decode/Encode() functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant