we already have r_str_nlen and r_wstr_clen to get either ascii string or wide
string length but in some cases such as defining string with 'Cs' or 'ds' from
visual mode we do not know if is a wide or ascii so r_str_nlen_w try to detect
and is prone to errors.
We should rename those API and maybe introduce new command to handle both cases
correctly without guessing and letting the user to chose the best
When opening a binary with -nn internal structures are not initialized being
one of them RBinFile that is need to retrieve the info.
However, when opening an image for example RBinFile exist but we do not have a
corresponding plugin or binary format to say so we are able to get strings.
This will be need a great refactor to handle correctly and furthermore
something I did not like is that baddr is only accesible through RBinObject and
I think it should be within RBin at least.
This was working before cause rabin2 was being called but without -B as
parameter. I have resorted for eprintf message so the user can configure as his
need.
This whitelists #! and #? and considers every other line starting with #
as a command, handled at r_core_cmd_subst() instead of reaching
cmd_hash(), because if that happens, file redirections and other
modifiers may get processed too in lines that otherwise look like
comments.
p8 (#2401) and pB (#2402) were broken, and px wasn't cleaning up
correctly after changing the block size (#6133).
The fix for the last one involved deferring block size cleanup to the
r_core_block_size() call at the end of the function, and moving that
call *after* seeking to the original position instead of before (which
is what was making it leave data with the wrong offset in core->block)
After simplifying that, the fix to the p8 and pB issue is just calling
r_core_block_size() to reread the block like px does.
* Test for valid numbers in arm getnum function
Using strtod it's possible to test if the string passed in is a valid
number
Also handles hexvalues
* KISS the fix