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

Not all octet strings need to be UTF-8 #27

Open
atesgoral opened this issue Aug 10, 2017 · 0 comments
Open

Not all octet strings need to be UTF-8 #27

atesgoral opened this issue Aug 10, 2017 · 0 comments

Comments

@atesgoral
Copy link

atesgoral commented Aug 10, 2017

https://github.com/mcavage/node-asn1/blob/master/lib/ber/reader.js#L187

Because readString() converts the buffer to a UTF-8 string, there is an irreversible corruption, when the string is converted back to a Buffer via Buffer.from(str, 'binary').

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