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

Version Tracker tool shows negative match numbers #149

Closed
v-p-b opened this issue Mar 10, 2019 · 1 comment
Closed

Version Tracker tool shows negative match numbers #149

v-p-b opened this issue Mar 10, 2019 · 1 comment
Labels
Type: Bug Something isn't working

Comments

@v-p-b
Copy link

v-p-b commented Mar 10, 2019

Describe the bug
The Version Tracker tool displays the number of matches in subwindow titles (at least). These numbers turn negative even in case of binaries with moderate sizes. I assume this is due to Java treating all integers as signed by default. In particular, ghidra.util.table.AddressBasedTableModel.getRowCount() seems to return int (signed datatype), which is then used in VTMarkupItemsTableProvider.createTableModel() for example. A trivial solution would be to change the return value of getRowCount() to long.

To Reproduce
Steps to reproduce the behavior:

I used Windows Defender's mpengine.dll for testing:

https://github.com/taviso/loadlibrary#dependencies
https://twitter.com/buherator/status/1104469769087004673

I ran Exact Function Instruction Matcher and Exact Data Matcher against versions 1.1.15400.4 and 1.1.15400.5.

Expected behavior
Number of matches should always be a non-negative integer.

Screenshots

https://twitter.com/buherator/status/1104471786429837314

Attachments

N/A

Environment (please complete the following information):

  • OS: Windows 10 64-bit
  • Java Version: 11.0.2
  • Ghidra Version: 9.0

Additional context

N/A

@v-p-b v-p-b added the Type: Bug Something isn't working label Mar 10, 2019
@v-p-b
Copy link
Author

v-p-b commented Mar 10, 2019

OK, never mind, it's just a missing space...

@v-p-b v-p-b closed this as completed Mar 10, 2019
cooljeanius added a commit to cooljeanius/ghidra that referenced this issue Sep 22, 2024
…sult converted to larger type

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
cooljeanius added a commit to cooljeanius/ghidra that referenced this issue Sep 22, 2024
Fix code scanning alert NationalSecurityAgency#149: Multiplication result converted to larger type
just a simple cast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant