Repository navigation
buffer: remove lines setting indexes to integer value from Blob.slice - #52588
Merged
Merged
Conversation
kylo5aby
force-pushed
the
blob
branch
2 times, most recently
from
April 22, 2024 01:49
d31f4f4 to
a00470f
Compare
aduh95
approved these changes
Apr 24, 2024
Collaborator
Contributor
Author
|
hi @aduh95 , I see an error related to |
jasnell
approved these changes
Apr 27, 2024
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
aduh95
approved these changes
May 6, 2024
Collaborator
|
Landed in bf8afe7 |
Merged
eliphazbouye
pushed a commit
to eliphazbouye/node
that referenced
this pull request
Jun 20, 2024
PR-URL: nodejs#52588 Refs: nodejs#52585 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
nodejs-github-bot
pushed a commit
that referenced
this pull request
Oct 22, 2026
Blob sizes cross between C++ and JavaScript as uint32 values, while the underlying DataQueue tracks them as uint64. openAsBlob() on a 5 GiB file therefore returned a Blob of size 1073741824. Reporting the real size is not enough on its own. The inbound direction assumes a uint32 as well, so a correct size reaches CHECK(IsUint32()) in ToSlice() and StoreDataObject() and aborts blob.slice() and URL.createObjectURL(). Pass the sizes as doubles and keep them as uint64_t in C++. Everything below this boundary is already 64-bit, so this only stops the narrowing at the edge. Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com> PR-URL: #66207 Fixes: #52585 Refs: #52588 Reviewed-By: Filip Skokan <panva.ip@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Since
bloballows maximumkLengthof 2GB, the indexes maybe out of signed integer range.remove lines setting indexes to integer value from
Blob.slice.they will be checked in Cpp side(
Blob::ToSlice) if they were not in unsigned integer range.Refs: #52585