Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

aac Uses Invalid Range When Used With -m #6585

Closed
robopeter opened this issue Jan 25, 2017 · 4 comments
Closed

aac Uses Invalid Range When Used With -m #6585

robopeter opened this issue Jan 25, 2017 · 4 comments
Milestone

Comments

@robopeter
Copy link

Attempting to run "aac" on a binary blob (no elf or other header) that was loaded with the -m flag yields an "Oops invalid range" error. Running "aac ###" where ### is a large number somewhere around the size of the binary yields the expected results.

The following chunk from cmd_anal.c seems to not make sense, but I don't know enough of what's going on to fix it:

				if (binfile->size > core->offset) {
					if (binfile->size > core->offset) {
						len = binfile->size - core->offset;
					} else {
						eprintf ("Opps something went wrong aac\n");
						return;
					}
				} else {
					eprintf ("Oops invalid range\n");
					len = 0;
				}

First, why are there two of the same if blocks inside one another?
Second, the third line here is going to be weird (negative?) if my offset is larger than my binary size, and really, I still want to analyze the length of the whole binary, it seems like start/end addresses should be updated, not length.

Thanks for any help with this.

@robopeter
Copy link
Author

Maybe this is related to #5433 ? or at least some of what's being talked about there...?

@radare
Copy link
Collaborator

radare commented Jan 25, 2017 via email

@robopeter
Copy link
Author

search.in is set to file... which is what I think I want, isnt it? I want to search the whole (relocated) file.
anal.in doesn't seem to be an option... ???

@radare radare added this to the 1.2.0 milestone Jan 30, 2017
@radare radare closed this as completed in c2ea513 Jan 30, 2017
@radare
Copy link
Collaborator

radare commented Jan 30, 2017

I wrote 4 tests for this thing in t.anal/others/aac

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

No branches or pull requests

2 participants