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

Exception limit is too small for large binaries. #15

Closed
jonomango opened this issue Jun 23, 2022 · 5 comments
Closed

Exception limit is too small for large binaries. #15

jonomango opened this issue Jun 23, 2022 · 5 comments

Comments

@jonomango
Copy link

uint64_t ExceptionDirWrapper::EntriesLimit = 10000;

I think that the current limit for exceptions is too small. Large binaries such as ntoskrnl.exe can have over 30,000 entries while bearparser will only parse the first 10,000. This really caught me off guard while using PE-Bear 😅. On a similar note, the number of entries is just DIRECTORY_SIZE / sizeof(ENTRY), so there shouldn't be a need to check for a null-terminator in here:

if (entry->getPtr() == NULL) {
delete entry;
break;
}

...although it does make sense if you're expecting to deal with malformed binaries.

@hasherezade
Copy link
Owner

@jonomango - you are right, I was going to remove those limits, but then I forgot, sorry for this! it is gonna be fixed soon.

fengjixuchui added a commit to fengjixuchui/bearparser that referenced this issue Jun 23, 2022
[BUGFIX] In ExceptionDir: removed limit of entries (Issue hasherezade#15
@hasherezade
Copy link
Owner

hasherezade commented Jun 23, 2022

@jonomango - please check the new build (it is not the official release yet):

https://github.com/hasherezade/pe-bear-releases/releases/tag/0.5.5.4-rc2

@jonomango
Copy link
Author

@hasherezade - Thanks for the quick response! I just tried it out and it works well. It does seem to slow down a bit when scrolling all the way to the bottom, but it's still usable.

@hasherezade
Copy link
Owner

@jonomango - the slowdown in scrolling is unfortunately a thing that cannot be avoided, it always happens when we try to display tables with many rows in Qt. It can be mitigated by introducing pagination. Maybe I will do it in the future, but from what I tested, this slowdown is not that significant to make this urgent.

@hasherezade
Copy link
Owner

@jonomango : the new release is ready: https://github.com/hasherezade/pe-bear-releases/releases/tag/0.5.5.4
thank you for your contribution!

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

No branches or pull requests

2 participants