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

fix: BufferSourceConverter.toArrayBuffer with Node.js Buffer slice #13

Merged
merged 2 commits into from Aug 16, 2023

Conversation

sander
Copy link
Contributor

@sander sander commented Aug 16, 2023

While using PKI.js in Node.js v20 I ran into bugs where BufferSourceConverter.toArrayBuffer of a slice would return a copy of its original, larger, buffer. Likely the library was calling the deprecated Buffer.prototype.slice where it should have called Buffer.prototype.subarray instead. Currently, pvtsutils does not handle such a Buffer slice view correctly. This change fixes that.

@coveralls
Copy link

Coverage Status

coverage: 90.909%. remained the same when pulling f84f7d8 on sander:feat/fix-node-buffer-slice into bb68257 on PeculiarVentures:master.

@microshine microshine merged commit 0ede2a4 into PeculiarVentures:master Aug 16, 2023
2 checks passed
@microshine
Copy link
Collaborator

Thank you for this PR! The new version v1.3.4 has been published.

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

Successfully merging this pull request may close these issues.

None yet

3 participants