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

base64 decoding drops characters when there is whitespace in the middle #13657

Closed
seishun opened this issue Jun 13, 2017 · 0 comments · Fixed by #13660
Closed

base64 decoding drops characters when there is whitespace in the middle #13657

seishun opened this issue Jun 13, 2017 · 0 comments · Fixed by #13660
Labels
buffer Issues and PRs related to the buffer subsystem.

Comments

@seishun
Copy link
Contributor

seishun commented Jun 13, 2017

  • Version: 8.1.0 and master
  • Platform: all
  • Subsystem: buffer
console.log(Buffer.from(" YWJvcnVtLg", 'base64').toString());

expected:

aborum.

actual:

aborum

I suspect e77a83f. This is also the cause for #13636. cc @addaleax

@addaleax addaleax added the buffer Issues and PRs related to the buffer subsystem. label Jun 13, 2017
addaleax pushed a commit that referenced this issue Jun 17, 2017
`max_i` should also include the characters that were just read by
`base64_decode_group_slow()`.

PR-URL: #13660
Fixes: #13636
Fixes: #13657
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax pushed a commit that referenced this issue Jun 21, 2017
`max_i` should also include the characters that were just read by
`base64_decode_group_slow()`.

PR-URL: #13660
Fixes: #13636
Fixes: #13657
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants