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

TypeRef table reconstruction SEGFAULT fix #511

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

JakubPruzinec
Copy link
Contributor

#458
I've added a check for null in TypeRef table reconstruction to prevenet null dereference.

@@ -840,6 +840,12 @@ std::unique_ptr<DotnetClass> DotnetTypeReconstructor::createClassReference(const
else
{
auto assemblyRefTable = static_cast<const MetadataTable<AssemblyRef>*>(metadataStream->getMetadataTable(MetadataTableType::AssemblyRef));

if (!assemblyRefTable)
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible/desirable to create a regression test for fileinfo from of the input binaries from #458? For example from the smaller one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, unfortunately the smaller binary contains no parsable TypeRefTable, therefore i made RT with the bigger one. avast/retdec-regression-tests#19

@metthal
Copy link
Member

metthal commented Feb 26, 2019

Thanks for fix. LGTM but add regression test for the smallest binary from #458 and that's all.

@metthal metthal merged commit 2c437bb into avast:master Feb 27, 2019
s3rvac added a commit that referenced this pull request Feb 28, 2019
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.

4 participants