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

BerTlvBuilder - addHex looses data if size not even #26

Open
kacert opened this issue Oct 30, 2023 · 0 comments
Open

BerTlvBuilder - addHex looses data if size not even #26

kacert opened this issue Oct 30, 2023 · 0 comments

Comments

@kacert
Copy link

kacert commented Oct 30, 2023

BerTlvBuilder.addHex - when adding Stiring of odd length, will just process the even number of characters.
In my view either it should throw an exception/runtime exception or process all characters correctly.

The data is then skipped in HexUtil.parseHex where the size of destination buffer is integer division that doesn't work for numbers that are not power of 2.

@kacert kacert changed the title BerTlvBuilder - addHex looses data if size not power of 2 BerTlvBuilder - addHex looses data if size not even Oct 30, 2023
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