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 read data out of boundary cause System.AccessViolationException #470

Merged
merged 4 commits into from
Aug 31, 2021

Conversation

shaopeng-gh
Copy link
Collaborator

No description provided.

@@ -249,6 +249,11 @@ public byte[] ReadBlock(uint size)
/// <param name="position">The position.</param>
public byte[] ReadBlock(uint size, int position)
{
if (position >= Data.Length)
Copy link
Contributor

@eddynaka eddynaka Aug 27, 2021

Choose a reason for hiding this comment

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

pls, add an entry in the releasehistory about this change #Resolved

@@ -249,6 +249,11 @@ public byte[] ReadBlock(uint size)
/// <param name="position">The position.</param>
public byte[] ReadBlock(uint size, int position)
{
if (position >= Data.Length)
Copy link
Contributor

@eddynaka eddynaka Aug 27, 2021

Choose a reason for hiding this comment

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

position >= Data.Length

is it possible to create a binary to test this cases? #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes! have no idea currently but let me check

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not able to get the exact same issue but I found another issue which is similar out of boundary. it is when compiled with special machine type.
fixed the error and added 2 test files.

src/ReleaseHistory.md Outdated Show resolved Hide resolved
@eddynaka eddynaka enabled auto-merge (squash) August 31, 2021 11:54
@eddynaka eddynaka merged commit c5aeee5 into main Aug 31, 2021
@eddynaka eddynaka deleted the users/shaopeng-gh/accessviolationexception branch August 31, 2021 12:09
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.

2 participants