24478 Commits

Author SHA1 Message Date
Paul B Mahol
a01e2b4d7c Check range of number of names in PE export 2022-07-24 15:24:32 -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
Paul B Mahol
58bd12c100
Allow to change entropy bars width with '[]' keys ##print 2022-07-24 15:22:30 -04:00
pancake
f39071a058 Fix Bx regression 2022-07-23 11:39:38 -04:00
Paul B Mahol
6c7c3d6951
Fix p=e output ##print 2022-07-23 10:34:38 -04:00
Paul B Mahol
45b6ddb101
Fix display issues with pss visual mode ##cons 2022-07-23 10:24:18 -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
Dennis Goodlett
0889cb74c0
Add python pickle machine (pypm) dissassembler ##anal 2022-07-21 18:14:37 +02: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
pancake
2ba1e80323 Use R_LIKELY and r_return in the skiplist api ##util
* NULL data is still supported
2022-07-20 16:52:24 +02:00
pancake
3c9777dd18 Optimized implementation of rand for skiplist ##util 2022-07-20 16:52:24 +02:00
Axel Iota
0f81b08bb9
Remove unused daylight logic in magic/mdump ##refactor 2022-07-20 13:24:46 +02:00
Axel Iota
fe20a5413b
Remove optyp global variable for magic ##refactor 2022-07-20 01:13:25 +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
d799814bc0 Fix potential null dereference in load_asm_descriptions() and flatten logic 2022-07-20 00:19:25 +02:00
Lazula
06552b6bec Remove unfreed r_str_ndup and make the source usable as a string directly 2022-07-20 00:19:25 +02:00
Lazula
2b7f236bb5 Fix INSIDE_M macro in anal_bpf to prevent accessing index 16 of 16-length array 2022-07-20 00:19:25 +02:00
Lazula
f6198d4801 Remove unnecessary ut32 >= 0 check in bpf_anal 2022-07-20 00:19:25 +02:00
Lazula
2ebd3a21d8 Fix potential null dereference and use-after-free in bin_wasm entries() 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
0672b6f9b8 Add missing inst.op null check in v850 anal pop case 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
pancake
ecd8d00aad Try to make coverity trust that index 2022-07-19 19:09:48 +02:00
Axel Iota
9684cb6d1f
Remove time_t now global variable for magic ##globals 2022-07-19 18:48:56 +02:00
pancake
7e84240719 Fix r2pm.sh path resolution issue ##r2pm 2022-07-19 17:30:58 +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
Denis Ovsienko
233ef038ff In cBPF jt and jf are unsigned, fix the code ##anal
The cBPF architecture defines that conditional operators offsets (jt and
jf) are unsigned, where 0 means the next operator, this way the code
flow is always loop-free.  However, the C code treated jt and jf as
signed, which for large enough values made the offset negative and broke
a number of things.

For example, in the bytecode compiled from the filter expression "tcp[0]
!= 0 && tcp[1] != 0 && tcp[2] != 0 && tcp[3] != 0 && tcp[4] != 0" for
DLT_EN10MB the very first JEQ instruction instead of "jeq 0x800,
0x00000010, 0x000004b8" was disassembled as "jeq 0x800, 0x00000010,
0xfffffffffffffcb8", the ASCII lines and the dot graph were incorrect.

Fix that by switching to unsigned values.
2022-07-19 09:29:43 +02:00
Paul B Mahol
e43d844c18 Fix crash when calling strcmp on NULL ##crash 2022-07-18 22:42:48 +02:00
pancake
7447468cb5 Fix heap oobread in the macho parser ##crash 2022-07-18 01:13:06 +02:00
Lazula
7fcee265ef
Merge asm.dalvik into anal.dalvik (#20455)
* Remove dalvik-specific macros in r_anal.h and r_asm.h, use static functions in anal_dalvik.c instead
* Move dalvik opcode.h into anal/arch
* Comment out unimplemented dalvik_opasm
2022-07-17 16:29:54 -05: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 97761f8ef0a0787be51711308d206273f0ac8116.
2022-07-15 14:07:21 +02:00
pancake
367f888818
Update the embedded libzip under shlr/zip ##io
* Fix problems with some ZIP files considered corrupted
2022-07-15 12:27:20 +02:00
pluswave
97761f8ef0
ARM disassembler: don't compute [pc, reg] memory location ##analysis 2022-07-15 12:15:12 +02:00
pancake
d329b54ea6 mbr magic is not good for deltified matches ##search 2022-07-14 18:08:16 +02:00
pancake
6539f9f575 Remove noisy mail.news magic file ##search 2022-07-14 18:06:56 +02:00
Maurizio Papini
b6db3a5774
Updated syscalls for aarch64 to linux 5.19.0-rc1 ##anal 2022-07-14 15:59:53 +02:00