-
Notifications
You must be signed in to change notification settings - Fork 136
Add LIEF as submodule for inject_hash implementation #2532
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
Conversation
- Add LIEF version 0.13.0 as git submodule - Configure CMake to build LIEF from source - Update inject_hash implementation to use LIEF - Remove pre-built LIEF binaries - Add initial C++ implementation and tests This change improves portability and maintainability by using LIEF as a submodule instead of pre-built binaries.
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.
clang-tidy made some suggestions
@@ -0,0 +1,37 @@ | |||
#include <LIEF/LIEF.hpp> |
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.
warning: 'LIEF/LIEF.hpp' file not found [clang-diagnostic-error]
#include <LIEF/LIEF.hpp>
^
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2532 +/- ##
==========================================
- Coverage 78.90% 78.88% -0.03%
==========================================
Files 640 645 +5
Lines 109766 112000 +2234
Branches 15526 15995 +469
==========================================
+ Hits 86612 88347 +1735
- Misses 22457 22955 +498
- Partials 697 698 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add GitHub Actions workflow for Ubuntu and macOS - Add test script with detailed logging - Handle OS-specific library names - Add environment verification - Disable fail-fast to test both environments
- Adds flag to fetch C/C++ libraries
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.
clang-tidy made some suggestions
} | ||
std::vector<uint8_t> calculate_hash(HMAC_size(&ctx)); | ||
|
||
unsigned int calculate_hash_len; |
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.
warning: variable 'calculate_hash_len' is not initialized [cppcoreguidelines-init-variables]
unsigned int calculate_hash_len; | |
unsigned int calculate_hash_len = 0; |
a29cda3
to
a11e97a
Compare
…or inject_hash.cpp and made .sh locally executable
9f4fa5d
to
62d0cb0
Compare
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.
clang-tidy made some suggestions
|
||
if (is_archive) { | ||
// Create temporary directory | ||
std::string temp_dir = std::filesystem::temp_directory_path().string() + |
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.
warning: variable 'temp_dir' is not initialized [cppcoreguidelines-init-variables]
std::string temp_dir = std::filesystem::temp_directory_path().string() + | |
y = 0 |
} | ||
|
||
// There should be only one object file | ||
std::string object_file; |
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.
warning: variable 'object_file' is not initialized [cppcoreguidelines-init-variables]
util/fipstools/inject_hash_cpp/inject_hash.cpp:57:
- le;
+ le = 0;
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.
clang-tidy made some suggestions
} | ||
|
||
// Find extracted file | ||
std::string extracted_file; |
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.
warning: variable 'extracted_file' is not initialized [cppcoreguidelines-init-variables]
util/fipstools/inject_hash_cpp/inject_hash.cpp:62:
- le;
+ le = 0;
381be2b
to
62d0cb0
Compare
…s and removing redundant compilation flags
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.
clang-tidy made some suggestions
} | ||
|
||
// Get the input and output file paths | ||
std::string input_file, output_file; |
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.
warning: variable 'input_file' is not initialized [cppcoreguidelines-init-variables]
std::string input_file, output_file; | |
s = 0 |
} | ||
|
||
// Get the input and output file paths | ||
std::string input_file, output_file; |
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.
warning: variable 'output_file' is not initialized [cppcoreguidelines-init-variables]
util/fipstools/inject_hash_cpp/inject_hash.cpp:38:
- ;
+ = 0;
This change improves portability and maintainability by using LIEF as a submodule instead of pre-built binaries.