8903 Commits

Author SHA1 Message Date
pancake
cb15913a70 Initial support for key repetitions in visual mode ##visual
* V3l is the same as Vlll, also works in cursor mode
2018-11-15 19:09:36 +01:00
pancake
cb11c0a329 Add help for wtf? 2018-11-15 19:09:36 +01:00
Khairul Azhar Kasmiran
cff54c1648 Enable pdrj (#12178) 2018-11-15 16:35:50 +01:00
Bet4
8f2f9de1f3 Make ood use absolute path
Fixes #12167
2018-11-15 14:38:43 +01:00
Riccardo Schirone
e44b272157
Do not check vaddr for isValidSymbol (#12176)
The only fact that there is no paddr, means the symbol is not present in
the file, so there's nothing to analyze (at least statically)
2018-11-15 14:04:09 +01:00
Riccardo Schirone
1c199adf9b
Vaddr assert (fix #11948) (#12170)
* Use is_vaddr in bin/elf as it is more meaningful

* Do not consider valid symbols with paddr UT64_MAX

This is set when the symbol does not have a paddr, so it means there
cannot be any code there and it's useless analyzing it.
2018-11-15 10:35:47 +01:00
Riccardo Schirone
08422752f2 Switch construct_rop_gadget to Ht 2018-11-15 10:23:26 +01:00
Riccardo Schirone
026d1914cb Check core->files before trying to purge the list 2018-11-15 10:22:57 +01:00
pancake
0f81fb8dc3 Fix 3 byte overflow in r_print_hexdump() 2018-11-15 01:40:11 +01:00
pancake
1d7967423a Fix #12111 - Add help for iS= 2018-11-14 23:49:57 +01:00
pancake
d5d7632b77 Implement help in all the i subcommands ##bin 2018-11-14 23:49:57 +01:00
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
Riccardo Schirone
af67995ca3 macro->cmd should use a wrapper because of different types 2018-11-14 22:29:54 +01:00
dav1901
c1f30de193 Minor code cleanups free/R_FREE (#12157) 2018-11-14 21:23:20 +01:00
Riccardo Schirone
37f547a6c5 Use R_BIN_TYPE_METH_STR instead of hardcoding the "METH" string 2018-11-14 17:30:38 +01:00
dav1901
b9c74118e2 Fix minor leaky issues (#12148) 2018-11-14 12:19:24 +01:00
Riccardo Schirone
8d9591eeaf Do not call r_anal_cc_arg if we don't have cc info (#12150) 2018-11-14 12:14:00 +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
Khairul Azhar Kasmiran
187f5ede22 Honor asm.bb.middle in r_core_print_disasm_json() / pdfj ##disasm 2018-11-14 02:32:00 +01:00
dav1901
8b83d03c99 Minor code cleanups free/R_FREE (#12145) 2018-11-13 23:41:28 +01:00
Khairul Kasmiran
5759f217c9 Remove unneeded check 2018-11-13 22:58:45 +08:00
Riccardo Schirone
90058945d2 Remove "referenced" from RBinObject and remove get_object ##refactoring 2018-11-13 13:05:18 +01:00
David CARLIER
5783cf42c4 Use after fix due to task free on non positive counting (#12138) 2018-11-13 11:56:57 +01:00
Paweł Łukasik
22ff13e069 Add dbg.verbose variable to show more info when debugging ##debug 2018-11-13 02:10:21 +01:00
dav1901
9b0fbf1ee4 Minor code cleanups - free/R_FREE/etc 2018-11-13 00:23:49 +01:00
Sergi Àlvarez i Capilla
a9ac72f160 Implement scr.scrollbar ##visual 2018-11-13 00:22:22 +01:00
Young-X
99641414fd Fix multiple potential vulnerabilities (#12113)
* bin_xtr_fatmach0.c: fix memory leak in function extractall

Signed-off-by: Young_X <YangX92@hotmail.com>

* check return value of r_list_newf in function oneshotall

Signed-off-by: Young_X <YangX92@hotmail.com>

* ufs: prevent memory leak

Signed-off-by: Young_X <YangX92@hotmail.com>

* minix: prevent memory leak

Signed-off-by: Young_X <YangX92@hotmail.com>

* jfs: fix memory leak in grub_js_find_file

Signed-off-by: Young_X <YangX92@hotmail.com>

* r_anal_plugin_free: fix null pointer deference for para a

Signed-off-by: Young_X <YangX92@hotmail.com>

* fix null pointer deference in function fix_back_edge_dummy_nodes
since ptr from and to may be NULL

Signed-off-by: Young_X <YangX92@hotmail.com>
2018-11-12 12:08:24 +01:00
Lowly Worm
96d8e82f69 silence warning about mismatched types 2018-11-11 16:48:17 -08:00
Lowly Worm
a408573ecf const modifiers on function return types are useless 2018-11-11 16:18:18 -08:00
Lowly Worm
fb4f221f8c const modifiers on function return types are useless 2018-11-11 16:11:36 -08:00
Lowly Worm
b90cb5da65 fix allocation so there is enough space for string allocation 2018-11-11 16:02:46 -08:00
dav1901
b6c3425610 Change void to RCore (#12125) 2018-11-12 00:03:06 +01:00
Khairul Azhar Kasmiran
68122dc27e Support overlapping basic blocks in anal.endsize ##anal
* af-* uses r_anal_del_jmprefs() instead
* anal.endsize supports overlapping basic blocks
* Further specify cond in r_anal_trim_jmprefs()
* Add x86 checks
2018-11-11 17:28:36 +01:00
Amith Venugopal
7f1877abe2 Fix #12116 - Implement bytesize for pvj ##print 2018-11-11 17:24:24 +01:00
Florian Märkl
77d80106e6 Protect task->refcount by tasks lock 2018-11-11 12:11:48 +01:00
pancake
59d7a92f8c Implement cmd.hexcursor feature ##visual
* Adds an RCoreBind in RPrint
2018-11-11 01:53:14 +01:00
pancake
6c7bfd846a Add help in wtf!? and add bitcode magic signature ##magic 2018-11-10 02:44:24 +01:00
Khairul Azhar Kasmiran
8946ddd284 af-* removes jmprefs as well ##anal 2018-11-10 02:14:34 +01:00
Florian Märkl
1f14da28d5 Add CCf* 2018-11-08 15:06:30 +01:00
radare
d8269a9e2b
Use ht to query strings for the cfstrings ##bin
* Fix va/pa issue in cfstrings
* Add many more asserts and fixed some bugs with wrong use of apis
* 6x faster loading times for fruity apps
2018-11-07 23:57:24 +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
Khairul Azhar Kasmiran
ba2db3a733 pdf sparse honors anal.jmpmid + afb+ fills op_pos array (x86 only) ##anal 2018-11-07 03:04:01 +01:00
David CARLIER
11127f0c76 Minor code cleanup for BSD 2018-11-07 00:34:16 +01:00
pancake
109d2f4f20 Fix usage message regression in the afn command 2018-11-06 22:21:48 +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
3738a97623 Fix several asserts and crashes when loading invalid reg profiles 2018-11-05 16:55:34 +01:00
radare
de309af4d6
Another minor cleanup in RBin and add R_TIME helpers 2018-11-05 16:38:41 +01:00
pancake
0b8c850869 Add new axff command (xrefs from function) ##anal 2018-11-05 12:08:27 +01:00