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

XER field size issue for ENUMERATED #272

Open
tkillian7 opened this issue Sep 25, 2023 · 0 comments
Open

XER field size issue for ENUMERATED #272

tkillian7 opened this issue Sep 25, 2023 · 0 comments

Comments

@tkillian7
Copy link

tkillian7 commented Sep 25, 2023

In the following enumeration:

Compression-Type ::= ENUMERATED {
    none(0),
    zlib(1),
    lzma(2),
    reserved(15)
}

The code that generates REQUIRED_BYTES_FOR_XER_ENCODING in the header file, produces a value that is too small, causing test cases to fail.

The line below compares the strings in the enumeration, not the length of the strings. Since 'z' is greater than 'r', 'zlib' is returned, rather than the longest string, which is 'reserved'.

https://github.com/maxime-esa/asn1scc/blob/9d0db14ea8d6cbe10189e3f02803f2caf3455166/BackendAst/DAstXer.fs#L49

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