12073 Commits

Author SHA1 Message Date
Sergi Àlvarez i Capilla
969e1c141e Break emulation when register profiles don't provide enough info 2022-03-23 13:02:55 +01:00
Sergi Àlvarez i Capilla
4abf7bf9ba Add esil.maxsteps to avoid infinite emulation loops ##esil 2022-03-23 13:02:55 +01:00
Lazula
6c868bb010 Last improvements for this patch 2022-03-23 11:53:03 +01:00
Lazula
879fbbbb35 Improve flag autocompletion 2022-03-23 11:53:03 +01:00
Lazula
626fd46553 Improve file redirect autocompletion 2022-03-23 11:53:03 +01:00
Lazula
5d4f8f83ca Improve #! autocomplete when tabhelp is enabled 2022-03-23 11:53:03 +01:00
Sergi Àlvarez i Capilla
50b8813f1d Fix w64blob artifact name for the release
* Fix meson -Dplugins=arm reg profile issue
* Fix an infinite loop when emulating with no valid regprofile
2022-03-22 20:06:43 +01:00
pancake
0052500c1e
Fix heap OOB read in macho.iterate_chained_fixups ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer 'tests_65305'

mrmacete:
* Return early if segs_count is 0
* Initialize segs_count also for reconstructed fixups

Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrmacete@protonmail.ch>
2022-03-22 16:56:27 +01:00
pancake
db253cab01 Fix #19833 - Fix asserts in aor 2022-03-22 14:56:02 +01:00
pancake
44b081b6a1 Fix back scrolling in the decompiler pane in panels ##visual
* Half revert b5311e975f09914f07ed03cb65f654dba71c37d7
2022-03-22 12:38:14 +01:00
pancake
19ae07accf Implement 'aeb' using APIs instead of commands ##esil 2022-03-22 12:01:50 +01:00
pancake
c8ae21f68f
Only build library archives when -Dblob is provided ##build
* Lowers the amount of objects from 2400 to 1500
2022-03-22 11:59:13 +01:00
pancake
82794237d7
Update sdb and fix some more unused return value warnings 2022-03-22 11:12:43 +01:00
Lazula
ea207c528e Fix dxr and use it in dd 2022-03-21 23:40:27 +01:00
pancake
d22d160c45 Fix minor memleak in pf 2022-03-21 17:57:07 +01:00
pancake
69815e22e4
Fix #19838 - Show pins in the disassembly as comments ##disasm 2022-03-20 10:49:53 +01:00
Lazula
e85ad664a6 Remove unused update variable in __print__decompiler_cb() 2022-03-19 04:05:44 -05:00
Sergi Àlvarez i Capilla
8a68ef26d4 Fix last memleaks spotted by coverity scan 2022-03-18 16:39:06 +01:00
Sergi Àlvarez i Capilla
c7ef0af76a Improve panels prompt drawing the bottom box line one line above ##visual 2022-03-18 16:35:38 +01:00
pancake
8089224302 Improve help message for dd? and autocomplete ##debug 2022-03-17 18:36:13 +01:00
pancake
2411bc75a3 Add 'dd+' to open files in the child process as read-write ##debug 2022-03-17 18:35:41 +01:00
pancake
39a44903c2 Add scr.notch to blank N lines on top of the screen ##visual 2022-03-17 10:12:17 +01:00
pancake
7699f37c7d Fix warnings spotted by latest XCode (unused variables) 2022-03-17 10:12:02 +01:00
pancake
df6c68e150 Add aaepa command to set all unknown imports as ret0 ##esil 2022-03-16 16:38:08 +01:00
pancake
3020803a39 Fix aecs and add test emulating hello world without libc ##esil 2022-03-16 15:33:03 +01:00
pancake
c7f9503e72 Add aaep and extend aep to support pin specific commands ##esil
* Implemented few basic libc calls in pure r2 commands
2022-03-16 15:33:03 +01:00
pancake
cffad47c88 Improve help message for psz, aek, aae, aep, aer and aex commands ##shell 2022-03-16 15:33:03 +01:00
pancake
4ba0af5d1d Fix meson -Dblob=true builds for static ##windows 2022-03-16 00:48:50 +01:00
pancake
f8a35da205
Dont use != NULL as its implicit in C, even for bool casts ##refactor
$ find binr libr -name "*.c" -exec sed -i -e 's/ != NULL//g' {} \;
2022-03-15 19:54:04 +01:00
pancake
4bed905d8a
Fix msvc warnings (#19827) 2022-03-15 19:27:34 +01:00
Sergi Àlvarez i Capilla
43a2ee3686 Improve the way asm.nbytes plays with asm.flags.inbytes ##disasm 2022-03-15 17:43:36 +01:00
Sergi Àlvarez i Capilla
7ccf9fbd6b Fix buffer overflow in asm.nbytes, add hard limit to 64 ##crash 2022-03-15 17:43:36 +01:00
pancake
7370759fa0
Fix some bugs spotted by CodeQL 2022-03-15 15:22:25 +01:00
Sergi Àlvarez i Capilla
00dd54d44f Fix recently-introduced memleak in panels 2022-03-15 11:55:14 +01:00
Sergi Àlvarez i Capilla
f44932aafa Add afiq for quiet functino info and refactor the anal/abi.inc ##analysis 2022-03-15 11:40:03 +01:00
Sergi Àlvarez i Capilla
d07bcfa8b2 Add help for 'pie?', add pieq and add ninstr in afi[j] ##analysis 2022-03-15 11:40:03 +01:00
Sergi Àlvarez i Capilla
b5311e975f Improve panels interactions with decompiler frame ##visual 2022-03-15 11:08:27 +01:00
pancake
d8d2fc7bca Record seek history when cliking around in panels ##visual 2022-03-14 12:42:16 +01:00
pancake
20ed8c14bd Fix blank decompiler issue when clicking randomly in panels ##visual 2022-03-14 12:42:16 +01:00
Lazula
d507bda91c Remove R_EMPTY and R_EMPTY2 2022-03-13 11:26:10 +01:00
pancake
63d4172d94
Fix last covs, mainly memleaks and update one test 2022-03-11 13:14:46 +01:00
pancake
b2cb721bf0
Restrict local vars and args in a 8KB range, otherwise skip ##analysis (#19811)
* Update and verify tests accordingly, new output is better
* Optimize function emulation by reusing bbdata
2022-03-10 16:45:59 +01:00
Lazula
619d9cb8cc
Add ddf command ##debug 2022-03-10 07:47:30 +01:00
aandersonl
947cae8599 Adds afva in all fcns flags (if any) ##analysis
* Analyze vars only if variable `anal.vars` is set adds some tests for variable/arguments analysis fix in anal/mips
* Fix get_config as boolean and use expressions for analyze all functions
2022-03-09 16:56:07 +01:00
Sergi Àlvarez i Capilla
9b124ff09e Skip afva on functions with signature registered ##analysis 2022-03-09 16:56:07 +01:00
Lazula
90ce9c795e
Fix dd command and update tests accordingly ##debug
* Add quotes around filename for dd command
* Account for string argument size in r_core_syscall()
* Fix command comments for dd
* Use a constant static stack size in r_core_syscall()
* Allow passing an address of the filename in memory for dd
* Change consumeBuffer() to print_buffer_hex()
* Improve dsue error message
* Update egg tests
* buf ownership is transferred to egg, dont free
2022-03-09 10:20:49 +01:00
Lazula
abf8041130 Improve scr.prompt.flag to include offset and hex delta 2022-03-09 09:11:32 +01:00
pancake
6a4dd942f8
Add help for the CL command ##bin 2022-03-08 13:55:55 +01:00
Sergi Àlvarez i Capilla
035e68e3f1 Cache file_exists when iterating over the source files ##bin
* Speedup large loading times for files with DWARF info
* Only speedups the cases where the files doesnt exist
* Need to refactor file_slurp_random_line() into str for better times
2022-03-08 13:04:24 +01:00
Sergi Àlvarez i Capilla
f72b7b5a50 Do not perform var/arg analysis on Java/Dalvik ##anal
* Fix almost an infinite loop on a clusterfuzzed dex file
2022-03-07 18:11:07 +01:00