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 sbyte overflow in TypeName parsing #107261

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

adamsitnik
Copy link
Member

discovered by the Fuzzer in #107206 (comment)

internal const sbyte ByRef = -3;
internal const int SZArray = -1;
internal const int Pointer = -2;
internal const int ByRef = -3;
Copy link
Member Author

Choose a reason for hiding this comment

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

this change was not necessary, but since the cast to sbyte was the source of the initial bug, I wanted to remove all usages of sbyte so we use int everywhere and don't ever run into similar problem

@adamsitnik adamsitnik mentioned this pull request Sep 2, 2024
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@adamsitnik
Copy link
Member Author

/ba-g the failure is unrelated

@adamsitnik adamsitnik merged commit 5b33115 into dotnet:main Sep 2, 2024
79 of 85 checks passed
adamsitnik added a commit to adamsitnik/runtime that referenced this pull request Sep 9, 2024
carlossanlop pushed a commit that referenced this pull request Sep 12, 2024
* AssemblyNameInfo fuzzer (#107195)

* add initial AssemblyNameInfo Fuzzer

* fix the first bug that it has discovered

* Fix sbyte overflow in TypeName parsing (#107261)

* Add TypeNameFuzzer (#107206)

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>

* [TypeName] Nested types should respect MaxNode count (#106334)

* Improve AssemblyNameInfo Fuzzer (#107257)

---------

Co-authored-by: Buyaa Namnan <bunamnan@microsoft.com>
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants