-
Notifications
You must be signed in to change notification settings - Fork 946
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
Added support for checking presumably missing dependencies #585
Conversation
ffd6d90
to
8d926e5
Compare
@@ -57,7 +60,7 @@ class ImportTable | |||
/// @{ | |||
void computeHashes(); | |||
void clear(); | |||
void addLibrary(std::string name); | |||
void addLibrary(std::string name, bool bIsMissingDependency = false); |
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.
We are not using hungarian notation anywhere in our projects so it seems rather inconsistent. Could you please rename it to isMissingDependency
?
#include "retdec/utils/dynamic_buffer.h" | ||
#include "retdec/fileformat/file_format/pe/pe_format.h" | ||
|
||
/** |
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.
This should be the very first thing in the file. Followed by includes.
} | ||
|
||
desc.push_back("Number of missing dependencies: "); | ||
sprintf(szNumDeps, "%u", (unsigned)fileinfo.getNumberOfMissingDeps()); |
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.
We have conversion functions available in utils/conversion.h
. numToStr
can be used here.
return false; | ||
} | ||
|
||
sprintf(szIndex, "%u", (unsigned)recIndex); |
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.
Same as above. numToStr
.
return false; | ||
} | ||
|
||
sprintf(szIndex, "%u", (unsigned)recIndex); |
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.
numToStr
const auto numberOfMissingDeps = fileinfo.getNumberOfMissingDeps(); | ||
|
||
Value jMissingDeps; | ||
jMissingDeps["count"] = (unsigned int)numberOfMissingDeps; |
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.
One thing with fileinfo
is that we present everything in JSON as strings and I think everyone working with fileinfo JSONs kinda expects this. Would it be possible to present this value as string too?
Fixed in commit 44063e76f38f4c1a952fb0541f48a2a608aa0566 |
No description provided.