Commit Graph

79 Commits

Author SHA1 Message Date
pancake
7ef58beabf Use r_hex_bin2strdup instead of copypasta in util.js2hex 2022-12-01 13:36:20 +01:00
pancake
f9f9e367de Use rlog instead of eprintf in 300 more places 2022-08-22 14:35:04 +02:00
pancake
fe71345577 Fix insert nibbles in visual hex editor ##visual 2022-08-18 21:30:41 +02:00
pancake
091b7c96c2
Fix last covs and support mount in ms ##fs 2022-07-08 09:51:21 +02:00
pancake
96f685ea9a Fix uninitialized accesses in base91 and r_hex_str2bin_until_new 2022-06-28 14:14:49 +02:00
pancake
c54ce884d8
More cleanups related to the r_arch commit 2022-04-28 12:53:49 +02:00
pancake
560f7fb424 Introduce r_arch.h. Use RArchConfig in RAnal and improve RRef api ##api
* Fix unaligned issue in hex asan test
2022-04-24 23:11:26 +02:00
Lazula
2255bf8b5d Many indentation style fixes
* Change several 8-space indents to tabs
* Apply tab indent style when breaking long lines
* Move operators from EOL to start of next line
* Fix ternary formatting
2021-11-18 10:43:52 +01:00
pancake
9fcf40eab8
Fix assert crash in unit test (#19386) 2021-11-08 10:11:08 +01:00
Dennis Goodlett
7c27574b5c
Simplify deserialization of byte ##signatures
* New API to get fist hex bytes in str ##util
2021-11-05 10:13:56 +01:00
pancake
b8f1edfa37 Fix null deref in arm64 esil 2021-05-09 01:09:39 +02:00
pancake
0cd6b5528a
Initial implementation of r_cons_eprintf ##cons (#18145) 2020-12-31 19:35:01 +01:00
pancake
3acbe60fde
Implement rafind2 -F to find the contents of the file ##search (#17143) 2020-06-29 20:11:34 +02:00
pancake
a51fd45a0e Add :json,:quiet,strlen,minlen,maxlen,sortlen in table queries ##table 2019-10-28 05:55:26 +01:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
pancake
c5cad6f482 Fix #14263 - Add hex.section option for the hexdump ##print 2019-06-12 13:58:12 +02:00
Martin Brunner
f17383613e Fix hexpairs search containing whitespace ##search
* Symptom: Search often failes when hexpairs are separated by spaces, e.g. "01 02 03" vs. "010203".
* Affected: radare2 and rafind2 at least
* Description: While parse-function r_hex_str2bin handles whitespace, auto-generated binmask
	(function r_hex_str2binmask, called when no mask is provided) does not, creates oversized mask,
	increases byte count, finally causing search for additional undefined bytes.
2019-06-10 15:32:14 +02:00
pancake
f33ebcbd89 Use r_return in RAsm APIs and fix some regressions ##asm 2019-02-04 00:25:27 +01:00
radare
f694a48280
Check if address is mapped in the hexdump and disasm via io.unalloc ##print 2019-01-16 16:06:03 +01:00
lzutao
b790439e28 Cast arguments to ut8 when feeding ctype.h functions ##refactor
The behavior of the `<ctype.h>` functions is undefined for negative
arguments (other than `EOF`). In such a situation, the argument should
be cast to `unsiged char` for safety.

References:
 - C Programming: A Modern Approach, 2nd Edition: page 612, chapter 23.5
2018-11-06 13:40:00 +01:00
pancake
737a35e81f Fix crash in the MZ parser found by googlefuzz ##bin
* Add r_print_hexdump_simple()
2018-10-24 13:05:29 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Michael Scherer
7f816f53db Fix r_hex_str_is_valid to handle space like r_hex_str2bin (#11489)
r_hex_str_is_valid is called only once from r_reg_arena_set_bytes,
to find the size of the hexadecimal string. However, it stop
at the first space, while the method used for the conversion
r_hex_str2bin is skipping space and continue to convert.

So with a long enough string passed to drw and arw, it is possible
to crash r2, as reported in https://github.com/radare/radare2/issues/11407
2018-09-12 04:29:27 +02:00
pancake
9ddce7af9c Better fix for r_hex_no_code 2018-07-17 19:48:58 +02:00
pancake
646cae7617 Fix test_r_hex_no_code unit test 2018-07-17 19:47:49 +02:00
pancake
be89180e7b Cleaning up asn1 apis, standarize IS_* apis and some more cleanup 2018-05-21 22:13:07 +02:00
pancake
e90fd02b97 Upgrade capstone to fix m68k bugs
Revert "Fix #9855 - Enlarge tmpbuf to 128 bytes because capstone code is crap"
- 11f99872f5.
Revert "Fix #9852 - Workaround to avoid capstone-m68k crash"
- 0607b97b01.
2018-05-11 12:51:36 +02:00
Paolo Monti
b32dd4ca9f Fix #2639, added support for javascript byte arrays in rax2 -F (#10065) 2018-05-11 10:58:16 +02:00
radare
b4b34e98f4
Fix loading of lang-python plugin (#9924)
Otherwise the plugin can't be loaded because of this:

dlerror(~/.config/radare2/plugins/lang_python2.dylib):
dlopen(~/.config/radare2/plugins/lang_python2.dylib, 6):
 Symbol not found: _PyUnicode_1BYTE_DATA
  Referenced from: ~/.config/radare2/plugins/lang_python2.dylib
  Expected in: flat namespace
 in ~/.config/radare2/plugins/lang_python2.dylib
2018-04-20 12:04:56 +02:00
radare
a0348bb1b5
Fix #9915 - crash in r_hex_bin2str from asm.c (#9922) 2018-04-18 13:23:03 +02:00
pancake
e0deacc916 Fix last covs and better dalvik pseudo 2017-12-16 02:54:02 +01:00
kriw
4d1acc2ff5 Fix #9014 add hex_no_code (#9016) 2017-12-14 17:41:24 +01:00
kriw
2320293207 fix hex_from_c (#9012) 2017-12-13 19:45:22 +01:00
kriw
6c2a366e53 rax2 Impl r_hex_ from_py (#9007)
* add parser for python

* add P flag for hex from python

* Revert "add P flag for hex from python"

This reverts commit 23a4721ef8.

* detect language automatically
2017-12-13 12:01:27 +01:00
kriw
1f46de2b82 fix bugs (#8984) 2017-12-07 20:56:29 +01:00
kriw
b097d75f24 rax2 Fix hex from C 2017-12-07 16:07:00 +01:00
pancake
2e8be3913d Fix #7569 - Show comments in pxa too 2017-05-23 15:53:58 +02:00
SchumBlubBlub
6c00c9e2d5 Reorganize string macros 2017-02-06 00:00:03 +01:00
pancake
a48df016ff Ignore newlines in r_hex_str2bin input 2016-10-09 23:54:21 +02:00
pancake
9eb1a2903b Enforce hexpair parsing rules. To fix rahash2 -S foo without s: 2016-10-04 15:46:46 +02:00
pancake
f5a73b73d7 Remove dupped hex2int function 2016-07-27 12:51:55 +02:00
Sven Steinbauer
547f8bbc5c Infer fixes Round 2 (#4993) 2016-05-24 22:22:15 +02:00
Mizari
59d614edf1 Added drw/arw command + r_reg_arena_set_bytes 2016-03-22 11:48:42 +01:00
Álvaro Felipe Melchor
ee988122de fix oob read when doing aae 2016-03-06 23:15:42 +01:00
deffi420
e7fdedd501 Improve r_hex_str2bin, fix overflow and error check 2016-01-23 11:53:43 +01:00
DZ_ruyk
010e997c3e Fix for issue #3766 2016-01-07 12:38:00 +01:00
Álvaro Felipe Melchor
b1583d5b24 Fix more issues reported by clang-analyzer 2015-11-03 22:14:00 +01:00
pancake
198174957c Fix rax2 -F C parser 2015-10-28 10:11:32 +01:00
pancake
57a0850014 Fix #2640 - crash in s/ 2015-05-28 19:38:24 +02:00
Judge_Dredd
fa57bfed27 fix CID 1297227, 1297226 2015-05-09 10:40:45 +02:00