-
Notifications
You must be signed in to change notification settings - Fork 156
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
Conversation
@@ -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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
No description provided.