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

ModuleDefinition.ReadModule can throw many (possibly) unexpected exceptions #556

Metalnem opened this issue Dec 24, 2018 · 0 comments


Copy link

ModuleDefinition.ReadModule can throw many (possibly) unexpected exceptions when reading modules from the attached archive. These are:

  • ArgumentNullOrEmptyException
  • ArgumentOutOfRangeException
  • AssemblyResolutionException
  • IndexOutOfRangeException
  • NullReferenceException
  • OverflowException

ModuleDefinition.ReadModule usually throws BadImageFormatException, NotImplementedException, and NotSupportedException when attempting to read malformed modules, so I'm not really sure which exceptions are really expected. You can run the following code to reproduce this (the path variable should contain the path to one of the extracted files):

ModuleDefinition.ReadModule(path, new ReaderParameters(ReadingMode.Immediate));

Found via SharpFuzz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant