I just misread the operands of the rcall instruction
their is 2 similar types of instruction (naming conveintions used only
by me and mentioned no where in the manual) the N_T where the n operand
is 8 bit and NET_T where the n operand is 11 bit
the rcall looks like the following 1101 1nnn nnnn nnnn which is obviosly
NEX_T
r2agent:
- Fix the usage to match other r2 binaries.
- Remove trailing whitespace.
- Remove addressed TODO.
- Add a default case to display usage and exit if -p option was used
without argument.
- Return 1 instead of 0 if too much arguments are provided.
- Small coding style fixes.
radiff2:
- Small coding style fixes.
rafind2:
- Add a default case to display usage and exit if an option have a missing
argument or getopt does not recognize an option character.
- Small coding style fixes.
ragg2:
- Small coding style fixes.
rahash2:
- Remove useless optarg check.
- Missing arguments and unknown options now display usage and exit.
- Small coding style fixes.
rarun2:
- Small coding style fixes.
rasm2:
- Small coding style fixes.
- Missing arguments and unknown options now display usage and exit.
rax2:
- Small coding style fixes.
radare2:
- Missing arguments and unknown options now display usage and exit.
- Small coding style fixes.
getopt is returning '?' if there is a missing option argument, which cause
the switch to branch on the default case. Consequently, tests on optarg are
redundant if a valid argument was given and never executed if the argument is
missing.
I also hunted 4th illegal memory read
the first 2 bytes of b is always casted to (ut16) type
with out checking if b even contains 2 bytes
now it is handled it correctly
Previously, elf_specs.h was an old(!) copy of glibc's elf.h with a few
additions accumulated over time.
This commit introduces a clear separation between an unmodified (save
one explanatory comment and a removed #include) copy of elf.h called
glibc_elf.h (elf.h already exists here), and elf_specs.h, which includes
the former file and only contains the required changes.
Updating glibc_elf.h in the future should be as easy as copying the file
from glibc and potentially deleting obsoleted parts of elf_specs.h.