Skip to content

Conversation

@atulkatti
Copy link
Contributor

No description provided.

@atulkatti
Copy link
Contributor Author

@Microsoft/chakra-developers

@atulkatti atulkatti requested a review from tcare January 10, 2017 19:08
newByteLength = mappedLength * elementSize;

if (offset + newByteLength > byteLength)
if ((uint32)mappedLength > (byteLength - offset)/ elementSize)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the above ToIndex call you could pass (byteLength - offset)/ elementSize instead of ArrayBuffer::MaxArrayBufferLength / elementSize. That should be same, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I will make that change.

@tcare
Copy link
Contributor

tcare commented Jan 11, 2017

Looks good, please get Akrosh's signoff as well.

@akroshg
Copy link
Contributor

akroshg commented Jan 11, 2017

:shipit:

@chakrabot chakrabot merged commit 6849df0 into chakra-core:release/1.4 Jan 11, 2017
chakrabot pushed a commit that referenced this pull request Jan 11, 2017
…ay lead to integer overflow.

Merge pull request #2350 from atulkatti:TypedArray.Bug10450472
chakrabot pushed a commit that referenced this pull request Jan 11, 2017
…hange as it may lead to integer overflow.

Merge pull request #2350 from atulkatti:TypedArray.Bug10450472
@ljharb
Copy link
Collaborator

ljharb commented Jan 11, 2017

What was the earlier change? Can you please link to the PR number?

@tcare
Copy link
Contributor

tcare commented Jan 11, 2017

@ljharb #2289

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.

6 participants