Skip to content

Fix dotnet coded index bugs#112

Merged
ayoubfaouzi merged 1 commit into
saferwall:mainfrom
matanix:fix-dotnet-coded-index-bugs
Jun 11, 2025
Merged

Fix dotnet coded index bugs#112
ayoubfaouzi merged 1 commit into
saferwall:mainfrom
matanix:fix-dotnet-coded-index-bugs

Conversation

@matanix
Copy link
Copy Markdown
Contributor

@matanix matanix commented Jun 8, 2025

Add missing tables to hasCustomAttribute and Implementation coded indexes and fix max column count comparsion according to spec

  • hasCustomAttribute was missing MethodDef, DeclSecurity, GenericParam, GenericParamConstraint and MethodSpec tables in it's list, causing potential invalid index sizes
  • Implementation was missing FileMD, causing potential invalid index sizes
  • When calculating the index size, the maximum column count table was compared as "greater than" to max uint16. According to the spec, the index size should be 4 when they are equal aswell, so this should be fixed to greater or equal.

Spec references are attached.

image
image
image

…exes and fix max column count comparsion according to spec
@ayoubfaouzi ayoubfaouzi merged commit ff737f3 into saferwall:main Jun 11, 2025
@ayoubfaouzi
Copy link
Copy Markdown
Member

Hey @matanix

Thanks for the PR, looks good to merge.

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.

3 participants