-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
buffer: inconsistent string validation #3770
Labels
buffer
Issues and PRs related to the buffer subsystem.
Comments
thefourtheye
added a commit
to thefourtheye/io.js
that referenced
this issue
Jan 30, 2016
As it is, if an invalid HEX string is passed to `Buffer` constructor, it will only use the valid HEX values and ignore the rest. But, it also throws an error when the length of the string is odd in length. This patch throws an error if the string is not a valid HEX string. Fixes: nodejs#3770
If it matters, the underlying issue is in buf = new Buffer(64);
buf.write('x', 'hex'); // TypeError: Invalid hex string
buf.write('xx', 'hex'); // 0 |
Additionally, it seems to me that |
2 tasks
Trott
added a commit
to Trott/io.js
that referenced
this issue
Mar 25, 2017
Remove error message when a hex string of an incorrect length is sent to .write() or .fill(). Fixes: nodejs#3770
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This seems confusing
The text was updated successfully, but these errors were encountered: