mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Yara rule matching not working properly with non-zero base addresses
This commit is contained in:
@@ -182,7 +182,7 @@ namespace hex::plugin::yara {
|
||||
|
||||
iterator->last_error = ERROR_SUCCESS;
|
||||
context.currBlock.base = address;
|
||||
context.currBlock.size = std::min<size_t>(context.region.size - address, 10_MiB);
|
||||
context.currBlock.size = std::min<size_t>(context.region.size - (address - context.region.address), 10_MiB);
|
||||
context.currBlock.context = &context;
|
||||
|
||||
if (context.currBlock.size == 0) return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user