Commit Graph

12553 Commits

Author SHA1 Message Date
pancake
02c17a9b59 Implement mdd, mdq and ms's ls -l ##fs 2022-08-22 01:50:32 +02:00
pancake
521e296fd7 Fix UAF in md<tab> by owning the graph by core in the heap, not in stack 2022-08-22 01:50:32 +02:00
pancake
82646917c7 Use RLOG in fs, fix null fs.mount and unused drx_at warning 2022-08-22 01:50:32 +02:00
pancake
37de3794e4 Implement s** for proper seek history parseable output ##shell 2022-08-20 23:47:31 +02:00
pancake
2da84ef851 Implement ics command to list address of class methods ##shell 2022-08-20 23:47:31 +02:00
pancake
990af88ae2 Protect ms shell with scr.interactive ##shell 2022-08-20 20:19:29 +02:00
pancake
55d9d55787
Linting for 'cmp (' and asan in Cf 2022-08-20 12:35:11 +02:00
pancake
1e3e198818 Rename asm.arm_cs to asm.arm ##arch 2022-08-20 02:39:01 +02:00
pancake
9fea483cf4 Fix null deref crash in RTable and improve C, ##shell 2022-08-20 02:17:09 +02:00
pancake
0fb54f9413 More RLOG usage in core 2022-08-20 01:03:21 +02:00
pancake
e4b09af81e TLS a global and add tests for e, 2022-08-19 23:11:47 +02:00
pancake
91dac00efa Better 'e!' command handling and use more R_LOG 2022-08-19 23:11:47 +02:00
pancake
8740bc55af Implement 'e,' for table format, old e, is now e: ##shell 2022-08-19 23:11:47 +02:00
pancake
bb380846d2 Fix prj.alwasyprompt description text ##config 2022-08-19 23:11:47 +02:00
pancake
59bfb51cec Use RCore.help instead of eprintf in more commands under aa ##shell 2022-08-19 13:16:59 +02:00
pancake
8994ff6bd3 Switch some eprintf to use R_LOG apis instead in core 2022-08-19 11:11:08 +02:00
pancake
09fd66facc Improve aab results by using section size ##anal
* Dont use cfg.debug in anal/blaze, rlog is enough
2022-08-19 11:10:32 +02:00
pancake
7cf0c56dbf Improve visual text editor navigation ('j' moves to next line) ##visual 2022-08-19 00:11:17 +02:00
pancake
79679dbae0 Fix #20602 - Insert and cursor glitching in hex panel ##visual 2022-08-19 00:09:59 +02:00
pancake
469e38c39d Implement interactive text editor mode in VPi command ##visual
* Tab to toggle between insert and replace mode
* Cursor is enabled after insertion
* Still not yet a replacement for your favourite editor
2022-08-18 23:29:36 +02:00
pancake
6654541c71 Implement wcu command to undo cached writes ##io
* Integrated with the visual hex editor with the 'u' key
2022-08-18 21:31:21 +02:00
pancake
fe71345577 Fix insert nibbles in visual hex editor ##visual 2022-08-18 21:30:41 +02:00
pancake
b74970f966 Add missing help for y- command 2022-08-18 21:29:55 +02:00
pancake
785a469a6d else block linting 2022-08-18 18:35:22 +02:00
pancake
22a1266331 Implement y- command and some other indentation fixes ##shell 2022-08-18 17:14:19 +02:00
pancake
7a35f03471 More source spacing linting 2022-08-18 14:37:29 +02:00
pancake
a538b2b700 Add =0 and =1 lintings 2022-08-18 13:58:40 +02:00
pancake
e01660dc52 Rename to io.basemap 2022-08-18 10:31:22 +02:00
pancake
52a22ab995 Add lint for \tfree( 2022-08-18 10:27:06 +02:00
pancake
41cf0bcf39 Add the 'i<' lint 2022-08-18 10:27:00 +02:00
pancake
660478b3cc sys/lint for '0 ;' 2022-08-18 10:26:56 +02:00
pancake
0cb57b6742 Use p8x and remove pcj from visual list ##visual 2022-08-18 01:32:07 +02:00
pancake
6d46f10664 Implement p8x and p8* similar to y* ##print 2022-08-18 01:31:24 +02:00
pancake
e4e4ecc605 Add lint for ';;$' and remove strncmp from io plugins 2022-08-18 00:11:36 +02:00
pancake
5a16cbc3b1 Fix last covs 2022-08-16 17:50:00 +02:00
Dennis Goodlett
8b796b216d
Refactor esil new in cmd_anal ##anal
* Replace cmd_anal repeated code refactor
* Use new static esil_setup_from_core in cmd_anal
* Combine functions to r_esil_new_setup

Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2022-08-16 09:17:52 +02:00
pancake
8c66266e99 Lint for trailing spaces 2022-08-15 18:21:18 +02:00
pancake
0239a265cd Fix warnings spotted by last gcc in cmd_anal.c 2022-08-14 21:07:19 +02:00
pancake
0b9e86e989 Fix issues found by last gcc in cmd_anal.c 2022-08-14 21:06:15 +02:00
pancake
620c3fa3dd Fix (null) license on r2 -L 2022-08-14 19:19:31 +02:00
Dennis Goodlett
8488630478 Fix R_LOG lint 2022-08-14 12:25:32 +02:00
Dennis Goodlett
cd261aa787 Refactor ar set command to static func ##anal 2022-08-14 12:25:32 +02:00
pancake
278b6b51b7 Fix memleak on -Cj failure 2022-08-12 17:24:09 +02:00
pancake
db7741247e Fix autocompletion for :.<tab> for r2frida ##shell 2022-08-09 20:50:16 +02:00
Paul B Mahol
9854d41cc2 Fix '/gg' output ##anal
Add also tests.
2022-08-09 20:41:05 +02:00
Paul B Mahol
326ba3592b Fix leaks when calling r_flag_all_list() ##core 2022-08-09 20:41:05 +02:00
Paul B Mahol
090bba7945 Fix several bugs when interacting in VE mode ##cons
No need to handle non-truecolor mode separately,
there is conversion internally to lesser formats.
Also conversion was wrong, using lower bits instead
of higher bits.

Disallow setting colors to fully black foreground and
background, this is so user does not shot itself in foot
by having to restart r2 because some items become invisible.

Limit opt to sensible values, prevent bad user experience.
2022-08-08 19:23:09 +02:00
Paul B Mahol
454e8c61ab Fix leak in nextpal() ##cons 2022-08-08 19:23:09 +02:00
Paul B Mahol
1bcc3670a7 Fix leaks in VE mode ##cons 2022-08-08 19:23:09 +02:00
Paul B Mahol
c163b3a715 Fix leak of memory returned by r_str_ansi_crop() ##cons 2022-08-08 19:22:49 +02:00
pancake
c0d3c226f1 Enable emulation in /as, it's fast enough and results are better ##search
* Use x16 on macOS and x8 on Linux
* Add test against glibc
2022-08-07 18:42:10 +02:00
Paul B Mahol
19f8235062 Fix leak in 'aex' command. ##anal 2022-08-07 16:24:55 +02:00
Paul B Mahol
4ac5862a90 Fix compilation warning ##anal
Fix logic in code.
2022-08-07 16:24:55 +02:00
Paul B Mahol
11c2d8de07 Silence compilation warning in show_reg_args() ##anal 2022-08-07 16:24:55 +02:00
Paul B Mahol
d747f49147 Fix leak in r_core_esil_step() ##anal 2022-08-07 16:24:55 +02:00
pancake
ddf483893e Test and benchmark --with-sysmagic in the CI ##search
* Improve output of search.verbose
* Remove conflictive magic signature
2022-08-07 16:24:08 +02:00
pancake
4f1cbdc6fc Fix null deref on non-capstone builds ##crash 2022-08-07 13:48:11 +02:00
Paul B Mahol
75deea0d96 Check that vector length is not 0 ##anal 2022-08-07 12:08:20 +02:00
Paul B Mahol
0f2e7dfdcc Fix leak of list when using asj command ##anal 2022-08-07 12:08:20 +02:00
Paul B Mahol
e5234b920c Fix leaks caused by not calling r_anal_op_fini() ##anal 2022-08-07 12:08:20 +02:00
Paul B Mahol
9b9a7ee892 Fix leak in bin_sections ##bin
No need to call strdup for last r_listinfo_new() parameter.
r_listinfo_new() strdups internally.
2022-08-07 12:07:34 +02:00
Paul B Mahol
7246782899 Fix leak in error path of r_core_anal_search_xrefs() ##core 2022-08-07 00:30:05 +02:00
Paul B Mahol
bca169d07f Fix leak of pointer left behind ##core 2022-08-07 00:30:05 +02:00
erfur
0133e92709
Emit json when radiff2 is run with -Cj ##diff 2022-08-07 00:20:57 +02:00
Paul B Mahol
dc28629707 Fix leak in some yanking cases ##util 2022-08-05 14:26:05 +02:00
Paul B Mahol
802eb32aa2 Fix leaks of allocated memory for duplicate plugins ##tools 2022-08-05 14:26:05 +02:00
Paul B Mahol
6ca1563d21 Move eprintf message to debug log ##util 2022-08-05 14:26:05 +02:00
Paul B Mahol
038287c551 Check if RList* is available before calling r_list_get_n() ##util 2022-08-05 14:26:05 +02:00
pancake
116bb77ffc Fix free(stack) crash in fortunetypes list 2022-08-01 18:48:39 +02:00
Richard Patel
b78855c38d Refactor a few eprintf 'Cannot …' to R_LOG_ERROR 2022-08-01 16:46:46 +02:00
RHL120
a86c2a1aaa
Minor indent fixes in projects.c 2022-08-01 13:40:05 +02:00
Paul B Mahol
4e47807078 Fix r_cons_printf call in calculator ##view 2022-08-01 09:54:18 +02:00
pancake
4f0fd49b1d Fixes riscv w64 build and improve console printing 2022-08-01 05:43:49 +02:00
pancake
8c51861578 Fix consola 2022-08-01 05:37:39 +02:00
pancake
8b44cee545 Add Assembler entry in Tools/ ##panels 2022-08-01 05:32:43 +02:00
pancake
9b1bc3f85f Fix drf for esil in panels and indent the egg 2022-08-01 04:18:42 +02:00
Paul B Mahol
8a11b29927 Add FPU/XMM/YMM panel displays ##view 2022-08-01 04:10:57 +02:00
Richard Patel
dcd740dd53
Refactor a few eprintf to R_LOG_ERROR ##refactor 2022-08-01 00:21:21 +02:00
pancake
5662271054
Be more strict when parsing numbers ##util 2022-07-31 16:53:42 +02:00
pancake
8df818b2de Add the infamous command tac ##shell 2022-07-31 14:41:55 +02:00
Paul B Mahol
02e306efa2 Fix leaks when switching color themes 2022-07-31 14:24:10 +02:00
Paul B Mahol
5cb5f9aab2 Fix leak of anal_arch in r_core_anal_cc_init() 2022-07-31 14:24:10 +02:00
pancake
1cd49a8d1c Add cmd.undo and handles it for w and CC commands ##core
* Improve undo command listing
* The cmd.undo variable when set some commands add entries into the `uc`
* This is wip, needs to have better facilities and support more commands
* Defer cmd.undo=true for r2-5.8.0
2022-07-31 06:34:16 -04:00
Paul B Mahol
2a1872fd1d Fix leak of abandoned buffer in anal_block_cb() 2022-07-30 07:22:36 -04:00
Paul B Mahol
8ffa196193
Fix not calling r_asm_op_fini() when needed (#20506)
The RAsmOp is used on stack when disassembling and after its content is not need it needs to call its _fini to free possible heap memory previously allocated.
2022-07-29 07:30:05 -04:00
Paul B Mahol
8b84123b78 Fix leak by freeing pointer on stack after it is abandoned 2022-07-28 19:05:51 -04:00
pancake
a4c97fb052 Dont show asm.describe on strings ##disasm 2022-07-28 17:13:29 -04:00
Paul B Mahol
bc268f1c46 Fix recently introduced stack buffer overflow ##visual 2022-07-28 15:33:49 -04:00
Paul B Mahol
50ba95eab1 Fix color changing for same block and prc=f ##print
The color issue of small numbers have been fixed in another commit.
2022-07-28 15:31:49 -04:00
Paul B Mahol
dae6293dab
Fix p=F output ##print 2022-07-27 17:14:50 -04:00
Paul B Mahol
e596a0bf9b
Make PageUp/Down keys less laggy ##visual 2022-07-27 16:08:35 -04:00
Paul B Mahol
77291f5d88 Fix small leak of list in cmd_prc_zoom() 2022-07-27 07:30:58 -04:00
Paul B Mahol
6a891ed683 Fix /rx ##search
Simplify code a little.
2022-07-27 07:28:33 -04:00
Lazula
cc70716d96 Add missing break in wtf switch statement 2022-07-25 16:07:52 -04:00
Paul B Mahol
b446f7ab47 Fix some memory leaks caused by buggy macros for reference counting 2022-07-24 15:24:32 -04:00
Lazula
cd15bdb1e8 Use R_LOG_ERROR for failure to decode b64 2022-07-24 15:23:53 -04:00
Lazula
7b6e462d23 Use encoded b64 length since API doesnt support max decoded length 2022-07-24 15:23:53 -04:00
Lazula
3265524885 Fix wtf base64 alias and add tests 2022-07-24 15:23:53 -04:00
Lazula
4ce57c06a8 Refactor cmd_wt() 2022-07-24 15:23:53 -04:00
Lazula
65ff60cf02 Move wt? and wt\0 into switch 2022-07-24 15:23:53 -04:00
Lazula
4c16c91c05 Start using argv and move wts inside switch 2022-07-24 15:23:53 -04:00
Lazula
5ea889c126 cmd_wt() rename str -> input 2022-07-24 15:23:53 -04:00
pancake
6ee9367a1b
Use of RNum.calc in rax2 to honor error code ##tools 2022-07-23 10:23:51 -04:00
Lazula
e74aaf1127
Fix memory management in cmd_wt() (#20477) 2022-07-22 14:16:19 -05:00
pancake
a723a3eb11
Fix the previous fix 2022-07-21 18:12:25 +02:00
pancake
22a5207860 Fix buffer overrun in pd reported by durandal_1707 ##crash 2022-07-21 17:32:39 +02:00
pancake
cfa869989c The RThread.start(true) had racy deadlocks, re-enable the bg http server ##util 2022-07-20 17:36:27 +02:00
Lazula
33ad417e27 Fix leak in wts when filename is allocated but empty 2022-07-20 00:19:25 +02:00
Lazula
637cd1e4d6 Fix leaks when wan receives an invalid instruction 2022-07-20 00:19:25 +02:00
Lazula
c6a895d859 Free second path string if file does not exist in getFortuneFile() 2022-07-20 00:19:25 +02:00
Lazula
69490072c0 Remove incorrect nonnull requirement in createFunction() 2022-07-20 00:19:25 +02:00
Lazula
a1719160a4 Add null check for r->anal before clearing hints in r_core_bin_update_arch_bits() 2022-07-20 00:19:25 +02:00
Paul B Mahol
01cab5876a
Allow seek to previous result item when it is at 0 offset ##visual 2022-07-19 09:32:59 +02:00
Paul B Mahol
e43d844c18 Fix crash when calling strcmp on NULL ##crash 2022-07-18 22:42:48 +02:00
Lazula
dd6aa1abfc Fix crash due to null debug file handle/uri 2022-07-17 22:01:42 +02:00
condret
9e81c46b7d Ignore asm->immdisp ##refactor 2022-07-17 04:47:08 +02:00
pancake
2b3d0f1f0a
Handle arm64's BTI instruction as a nop ##analysis (#20452)
* Revert "ARM disassembler: don't compute [pc, reg] memory location ##analysis"

This reverts commit 97761f8ef0.
2022-07-15 14:07:21 +02:00
pancake
295c49706b Fix /as on arm64-linux and add missing tests to cover it ##search
* This needs a proper fix which will break abi
2022-07-12 14:32:20 +02:00
pancake
3d8bafccce
Handle the s# command as in 's #' ##shell 2022-07-12 02:42:30 +02:00
pancake
0fe2fab15c Workaround for the fatbin slice selection regression ##bin 2022-07-08 12:30:31 +02:00
condret
30168a2065 Use arch/bits info from anal if asm is not available in r_core_bin_update_arch_bits ##refactor 2022-07-08 12:30:31 +02:00
condret
230f735c52 Merge asm_x86_cs into anal_x86_cs ##refactor 2022-07-08 12:30:31 +02:00
pancake
091b7c96c2
Fix last covs and support mount in ms ##fs 2022-07-08 09:51:21 +02:00
pancake
ad1add71cb
Fix a new linting to remove the double error message in RLOG calls ##lint 2022-07-07 20:25:26 +02:00
pancake
34b21efc1e Fix mips identification via RArchConfig instead of RAsm 2022-07-07 19:16:22 +02:00
pancake
a297b27773 Add fs.cwd to define default path in ms ##fs
* Remove unnecessary global variable
2022-07-07 11:10:53 +02:00
pancake
f2edc67c97 Fix onnu command usage and test 2022-07-07 03:39:36 +02:00
pancake
a7399890fe Tiny optimization in RBuffer -0.01s speedup ##io 2022-07-07 03:39:36 +02:00
pancake
1cf4e53c7b
Fix two more projects tests with the new onnu ##projects 2022-07-07 02:12:29 +02:00
Lazula
dddd13a7dd
Partial #19887 - Refactor c[248], add and test c[248]* ##shell
* Improve argument handling
* Don't allow c1*
* Add * mode for c[248]; Uses c* code
2022-07-07 01:58:11 +02:00
condret
0995ae0111 Fix loading xtr bins without arch dedicated asm plugin loaded ##core 2022-07-05 18:57:45 +02:00
pancake
332574aeb5
More eprintf -> RLOG here and there ##refactor 2022-07-05 13:34:13 +02:00
pancake
8c80cfe7d9 Fix #20405 - Multiple fixes and improvements in projects ##projects
* io maps are now saved and restored
* add an extra test and review/update others
* Use omu in om* and run o*;om* in P
* Better handling multiple P subcommands and help msg
* Use more R_LOG instead of eprintf
2022-07-05 10:56:04 +02:00
pancake
21064e9473 Add omu command to create a unique map ##io
* Add another broken project test
* Fix warning regression introduced in previous windows fix
2022-07-04 21:24:40 +02:00
Sergi Àlvarez i Capilla
5df05f446f Fix few type cast issues spotted by msvc 2022-07-04 18:46:54 +02:00
pancake
e2bbe2b14e
Add a linting to avoid R_LOG calls ending with a dot ##lint 2022-07-04 17:42:25 +02:00
pancake
faaa934514 Fix (null) printing on pi command ##print 2022-07-03 12:36:47 +02:00
pancake
9f12bfd0a8
Get rid of some globals and tls-ify others 2022-07-03 10:01:58 +02:00
pancake
47b7e8ae2b Add and fix two more for loop linter rules 2022-07-02 22:40:28 +02:00
pancake
bb49596759
Use r_str_startswith() in libr/io/p instead of strncmp ##lint 2022-07-01 17:10:05 +02:00
pancake
504002fca2 Few http webserver improvements ##web 2022-07-01 11:08:05 +02:00
pancake
bed72b73b2
Add another source linting to avoid newlines in RCore.cmd() ##refactor 2022-06-30 22:22:30 +02:00
pancake
fca98fbea7
Use more R_LOG in core/cmd_anal 2022-06-30 20:55:47 +02:00
condret
dfcb8186b9 Correct help msg fro ph command ##doc 2022-06-29 01:51:47 +02:00
pancake
3db3750eb0
Lint for x"" ##cleanup 2022-06-28 12:07:58 +02:00
pancake
304a3a7fcf
Use more R_LOG instead of eprintfs and add more linting checks ##refactor 2022-06-28 11:24:06 +02:00
Richard Patel
363df75c06
Replace some instances of eprintf with R_LOG_ 2022-06-28 02:49:42 +02:00
pancake
8d88e1208d Fix echo q|r2 return code 2022-06-28 02:00:26 +02:00
pancake
e69645a9c2 Add sys/lint.sh and run it in the CI ##refactor 2022-06-27 11:31:24 +02:00
pancake
795a274b48 Set asm.bits when using anal plugs (not only asm ones) and update 8051 test 2022-06-27 10:58:09 +02:00