1717 Commits

Author SHA1 Message Date
lzutao
50320592a6 Fix #12060 and #12072 - Rewrite r_num_abs and r_num_units ##core
r_num_abs:

- Make r_num_abs static inline
- Use unsigned long long type when defining TB macro
- Use st64 instead of long long

r_num_units:

- Add len argument for buf in r_num_units
- Add PB and EB for r_num_units
- Always display one number after decimal point

  * This change simplifies the code
- Use long double type as assigning from ut64 to double cause data loss

r_num_tail_base:

- Use isxdigit (fast) instead of isHexDigit (slower)
- Rename nth to get_nth_nibble

Update all functions to use with new r_num_units:

- Remove side effect when using in other functions like cb_printf

* Trim trailing .0 when input is power of 2
2018-11-14 23:35:44 +01:00
Christopher Hewitt
451c76c71d Open radare2 project after loading plugins and keep the -e flags ##projects 2018-11-14 22:31:02 +01:00
pancake
701ecb2835 More include fixes 2018-11-14 13:12:34 +01:00
Artem Zinenko
4a2bc97a35 Fix #11918 - Moved r_print.h into r_util/r_print.h 2018-11-14 10:54:22 +01:00
Riccardo Schirone
f77ecfb357 Upgrade SDB and use the new HtPP, HtUP, HtUU ##refactoring
* sdb-sync: update to commit ea05ca8808605daa683a2b35f143e24c3a70f0c9
2018-11-14 10:47:28 +01:00
Riccardo Schirone
90058945d2 Remove "referenced" from RBinObject and remove get_object ##refactoring 2018-11-13 13:05:18 +01:00
Paweł Łukasik
22ff13e069 Add dbg.verbose variable to show more info when debugging ##debug 2018-11-13 02:10:21 +01:00
Riccardo Schirone
08e5b4aaad Refactoring RBin.open/close and RBinOptions ##bin
* r_bin_close should be r_bin_file_close
* moved bin/open.c into bin.c
* set BinFile id in r_bin_load_io
* use r_bin_open_io instead of r_bin_load_io
* also prefer RBinOptions instead of multiple arguments
* rename r_bin_load to r_bin_open and use RBinOptions
2018-11-07 17:22:41 +01:00
radare
71053f17e9
Move trie, mixed, slist into Sdb's Attic, and DES from util to crypto ##refactor 2018-11-07 17:18:14 +01:00
pancake
3e98d0f778 Fix #11237 - Handle -@ in rasm2 as an alias for -o 2018-10-31 11:45:50 +01:00
a1ext
4e8e7de7b4 Fix unicode path issues in Windows ##windows 2018-10-30 01:04:47 +01:00
David CARLIER
4597224d7d Fix r2agent segfault. (#11950)
Since it s based on reference counting, it is safe to make sure the context is initialised.
2018-10-26 13:21:12 +02:00
Sajjad Pourali
503844ac77 Fix MacOS Mojave User Debugging Problem ##build 2018-10-25 23:42:47 +02:00
Maijin
337dd0d909
Remove Sf command ##refactoring 2018-10-25 21:20:16 +02:00
Riccardo Schirone
6115f00455
remove r_bin_load_io2 and rename MODE defines ##refactor
PR #11888 

* bin: no need for 2 r_bin_load_io APIs
* bin: remove io-related unused functions
* r_bin.h: remove some old comments
* r_bin.h: group together related APIs
* extract print/set modes in r_types, to remove dups in r_bin and r_core
* clang-format-diff: fix ternary operator indent for pancake
2018-10-24 16:54:57 +02:00
pancake
9f896002ba Fix macos-sign 2018-10-22 20:03:39 +02:00
pancake
f60ca729fb Just add -static in linux 2018-10-22 19:57:45 +02:00
pancake
a6a6d34718 Add -static for the binaries when --with-libr ##build 2018-10-22 15:16:52 +02:00
pancake
f97aded52a Statically link the binaries when using --with-libr 2018-10-22 15:10:29 +02:00
Riccardo Schirone
64d16fc506 Some code cleanup and asserts in RBin ##refactor
* libr/bin: no need to allocate RBinOptions on the heap
* bin: start using r_return_* around, that's just the beginning
* bin: remove io_owned since it's not used anywhere
* io: make r_io_bind return nothing
* bin: remove unused functions and simplify r_bin_load_io
r_bin_load_io was calling r_bin_load_io2 with UT64_MAX as sz parameter,
but r_bin_load_io2 just returns false if (st64)sz is less than 0, so
that call is actually useless and can be removed.
* bin/bin: fix some preconditions
* bin/open: fix precondition to check for bin and filename too
2018-10-21 01:27:15 +02:00
pancake
fd0ab00b14 Fix static blob build for android and disable libuv ##build 2018-10-20 20:10:17 +02:00
pancake
a33fc03725 Fix visual panels glitch and handle 's' in zoom mode ##visual
* And remove dead code
2018-10-20 02:12:30 +02:00
radare
9beda2f60f
Allow multiple packages as arguments for r2pm -i,-c,-ci ##tools (#11843) 2018-10-18 10:10:35 +02:00
pancake
2142a8a992 Fix build 2018-10-15 20:48:24 +02:00
pancake
de525b09d8 Add missing r_hash dependency for rafind2 2018-10-15 20:47:41 +02:00
radare
c8356abb03
Add zign hash using sha256 (#11822) 2018-10-15 19:13:18 +02:00
Riccardo Schirone
6c462b3ecc rafind2: avoid memleaks (#11817) 2018-10-15 16:18:51 +02:00
bannsec
e56d3de4ab Fix memleaks in ragg2 (#11788) 2018-10-12 12:18:22 +02:00
Riccardo Schirone
ab4578a546
remove random warnings when compiling (#11767)
* remove random warnings when compiling

* debug_native: provide r_debug_handle_signals on windows
2018-10-08 13:21:50 +02:00
pancake
c4395fd8ee Fix #10290 - Support R2_ and without prefix in r2 -H 2018-10-08 00:43:40 +02:00
pancake
b151764ffe Support tar and fix clean in r2pm 2018-10-07 00:18:26 +02:00
David CARLIER
036db696d1 Fix couple of leaks. (#11716) 2018-10-02 15:24:27 +02:00
David CARLIER
da3d1bb4cc Fixing few leaks. (#11707) 2018-10-02 00:21:29 +02:00
radare
f7be81edbb
Fix instruments leaks (#11695)
* Fix a small memleak in the disasm reflines
* Fix huge args leaks in r_parse for arm
* Fix another memleak
* Fix memleak in VR
* Fix memleak related to bad use of r_list_join
* Fix warnings
* Fix two rlist related asserts
2018-10-01 19:57:33 +02:00
bannsec
4188860216 Memory Leak (no path free) in rasm2 (#11703)
Small memory leak in rasm2.
2018-10-01 09:29:03 +02:00
bannsec
8b6feae97b Memleak (#11688)
* Memleak

Guessing this is where the free should go... Ref #11687
2018-10-01 09:14:11 +02:00
David CARLIER
79871d4164 Fix #11671 (#11673)
Using macro for regex module too.
2018-09-27 11:16:44 -07:00
pancake
41ec949204 Fix #11112 - Rename {srwx,flags,perms} to perm. (-21 LOC)
Unify R_IO, R_BIN, R_BP, .. into R_PERM_* using 1 letter syntax
2018-09-22 11:31:45 +02:00
pancake
798ef9519e Detect error when something fails in binr/ 2018-09-22 11:31:45 +02:00
radare
478dd2377a
Fix #11566 - Regression in r2 = introduced by threading and siol (#11598)
Still not perfect because stdin works, but the tty size/configuration
is not correct when reopening.
2018-09-21 00:13:19 +02:00
pancake
d34ada1a05 Minor fixes for mach0 signature parsing, fix crash in ae? and other null derefs 2018-09-18 11:06:00 +02:00
David CARLIER
acdb507945 core file: fix couple of leaks (#11571) 2018-09-18 13:16:44 +08:00
morbith-dqtz
5c6b976343 linux_heap_glibc: refactor (#11541) 2018-09-17 02:00:39 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
radare
4bb4a2ce30
Parse CodeSign blobs and compute sha1/sha256 in mach0 binaries (#11491)
- rabin2 -OC # wip requires proper refactoring and redesign
2018-09-12 16:03:36 +02:00
pancake
f90b534a4d Fix several bugs introduced during r2con 2018-09-10 16:33:29 +02:00
Adrian Pistol
fe6f9badb5 radare2: Try to detect color support and set scr.color accordingly. (#11420) 2018-09-07 16:29:35 +02:00
radare
6ef364521f
Fix #11370 - rahash2 showing the same checksum when passing multiple files (#11372) 2018-09-04 01:28:13 +02:00
pancake
f1dc368018 Fix #11383 - Invalid initial block contents when opening with no file 2018-09-04 01:16:13 +02:00
Neven Sajko
b0436220dc libr/cons: Do proper signal handling, use pselect (#11376)
Fixes async-signal-safety and changing errno within the signal handler
for SIGWINCH, which can cause crashes and maybe security issues.

For async-signal-safety make the signal handler just set a flag, which
is checked for while waiting for input (pselect).

SIGWINCH is blocked process-wide, except in pselect.
2018-09-03 23:46:13 +02:00