Commit Graph

117 Commits

Author SHA1 Message Date
Anton Kochkov
b22d9f3065 Fix grammar across the code 2019-06-18 14:51:30 +08:00
radare
571a080ca7
s/CORELIB/R2_PLUGIN_INCORE/g (#14295) 2019-06-13 19:12:51 +02:00
radare
bf5e302881
Add anal.ex option, cleanup and improve the Java support ##anal
* Current java implementation of the analysis is not working well
* RBin.Java doesnt updates the vsizes because it seems to break things. wip for another PR
* Added anal.ex option to use extensions or not
2019-05-08 18:26:11 +02:00
pancake
bfb310360c Fix jump/fail for Java ops 2019-03-26 13:59:44 +01:00
Florian Märkl
5d33ce3e86 Move RAnalOpMask into parameter 2019-03-15 22:57:07 +01:00
Khairul Azhar Kasmiran
ba700dacc3 Pass RAnal instead of rbtree to fcn rbtree api ##refactor 2019-03-03 12:28:36 +01:00
dav1901
f24556c189 Fix few clang-analyzer warnings (#12548) 2018-12-24 01:18:12 +01:00
dav1901
cc7023dae8 Fix null deref in RAnal.java 2018-11-19 02:17:57 +01:00
Paul I
bf29250ddd Fix #11487 (#11534) 2018-09-15 22:52:12 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
pancake
f90b534a4d Fix several bugs introduced during r2con 2018-09-10 16:33:29 +02:00
David CARLIER
1eae637f4b Fix #11424 attempt. (#11451)
Deduplicate java function entries.
2018-09-08 18:28:54 +02:00
pancake
224e6bc13f Fix #10296 - Heap out of bounds read in java_switch_op() 2018-06-11 03:15:07 +02:00
Riccardo Schirone
b703dfbf17 anal/xrefs: single, global xrefs API
* several bugfixes
* Fix xrefs/refs confusion with asm.cmt.refs
* Also check if xref source is valid offset
* Fix ax* to show type of ref
* anal/xrefs: pass the right hashtable to mylistrefs
* r_anal_refs_get should use anal->refs, not anal->xrefs
* anal/fcn: add xref also when there's a CALL to a noreturn function
* projects: use radare2 output of ax command to save/restore xrefs
* core/cmd_anal: when analyzing calls, we should use REF_TYPE_CALL
* core/canal: use xrefs API, because the list is a just a copy
* core/canal: rename "loc." entries to "fcn." when a CALL is found
* sort xrefs to make results consistent
* core/canal: avoid recomputing function every time during `aan`
* anal: move fcn_refs/xrefs functions to the xrefs.c file
* core/canal.c: avoid iterating fcn xrefs list
* anal/xrefs: compute fcn xrefs by analyzing fcn addresses
* remove other unused functions
* anal/xrefs: remove fcn_xrefs_add and fcn_xrefs_deln
* anal/xrefs: remove old fcn->refs/xrefs
* anal/xrefs: directly store RAnalRef objects in the hash table
* libr: prevent memory leaks when using refs/xrefs
* anal/xrefs: merge anal/ref and anal/xref and clean API

Big xrefs/refs refactoring that provides a more uniform and simple API.
It avoids changes to refs/xrefs except through the API and it keeps all
xrefs/refs info in one single place, to improve consistency.

Thanks to:
Riccardo Schirone <sirmy15@gmail.com>
pancake <pancake@nopcode.org>
rene <rlaemmert@gmail.com>
2018-05-04 21:40:47 +02:00
Florian Märkl
d6e3036322 Propagate changes of fcn->_size in anal->fcn_tree 2018-03-18 15:11:29 +01:00
pancake
79bac9c5d7 Fix #2983 - double-free issue in Java.RAnalOp.cases switch 2018-02-04 12:42:42 +01:00
Ziyaddin Sadigov
d4dd6fd5e6 Fix typo regarding byte size (#9067) 2017-12-27 18:33:58 +01:00
Khairul Kasmiran
3e68588ef0 java_analyze_fns now updates fcn_tree 2017-12-24 13:29:35 +08:00
pancake
8ded1626fd Enums are int32 on msvc, this breaks RAnalOp.type, switch to ut32 2017-12-23 02:40:45 +01:00
Fangrui Song
97d53814f9 Add fcn_tree to RAnal (interval tree based on augmented red-black tree) and optimize r_anal_get_fcn_in (O(n) -> O(log n)) (#9034)
The long term plan is to phase out RAnal::fcns and migrate to RAnal::fcn_tree.
2017-12-17 22:55:32 +01:00
Khairul Azhar Kasmiran
137874aba2 Fix pdf function lines for Java methods (#8415) 2017-09-04 02:56:54 +02:00
pancake
559999dd7f Code cleanup and fix analysis regression in Java code 2017-09-02 01:57:13 +02:00
alvarofe
bbca2d3dff Trap before in anal_java to avoid continue execution 2017-08-29 00:12:14 +02:00
alvarofe
2e462ec8f0 Bring RIODesc from SIOL and cleanup 2017-08-18 01:31:57 +00:00
pancake
0ac3477662 Use r_str_const to avoid dangling calling conventions in fcn->cc 2017-05-04 14:52:43 +02:00
Álvaro Felipe Melchor
3222447eab Fix warnings when compiling in linux 2016-11-08 01:58:07 +01:00
pancake
42caf90d32 Fix #6051 - add RAnalOp.id 2016-11-01 23:42:12 +01:00
Álvaro Felipe Melchor
b3e55980a3 Fix #6035 - oob read java_switch_op 2016-10-26 19:04:26 +02:00
Álvaro Felipe Melchor
5800b23e8f Fix #6034 - "fix" uaf in fcn_callconv
share ownership should be taken with care
2016-10-26 18:57:15 +02:00
saucec0de
c908e0f818 Fixing ds in x86 (#5802)
* Fixing ds in x86
* Several updates due to new OP_TYPE
2016-09-22 13:42:06 +02:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
Ahmed Mohamed Abd El-MAwgood
2dbb3d8fc6 Calling convention profiles in SDB (#5358) 2016-07-27 13:50:14 +02:00
Riccardo Schirone
8727840e90 anal/fcn: use getter/setter to access the size of a RAnalFunction
This is one of the first steps to improve analysis. This way we'll have
one single place to change if we want to change the meaning of the
"size" field. (size -> realsize)
2016-05-19 01:50:50 +02:00
Riccardo Schirone
c169073c74 Fix #4080 : remove assumption that functions are contiguous
* anal/p/anal_java: remove function that does nothing

* anal/fcn: workaround for java analysis
2016-05-14 16:37:24 +02:00
pancake
4e0a71c0c3 Fix #4573 - fix oobread in java disassembler 2016-04-10 01:23:18 +02:00
pancake
9c9bb2dbd5 Memory optimization for flags (-70%) + some warnfixes + sdb-sync 2015-11-08 23:38:42 +01:00
pancake
f137c8e460 Restrict switch statement boundaries in Java analysis 2015-11-05 14:20:42 +01:00
pancake
0f5a2cc641 Fix infinite loop + mem exhaustion in malformed java 2015-11-05 14:00:49 +01:00
pancake
cb936e10e9 Fix #3490 - RAnalPlugin.arch.typeof(char*) 2015-10-22 02:23:52 +02:00
pancake
8eb71af9ed Internal reg prefix is now $, 85008 for curpc, TRAP for traps 2015-09-14 11:31:54 +02:00
Jonathan Neuschäfer
523aa3af5c add .version to all plugins 2015-07-12 19:05:33 +02:00
jvoisin
8155c6e8f2 Even more coverifix 2015-06-01 23:06:55 +02:00
pancake
1d6a40b92f Fix more Java issues 2015-05-11 16:46:52 +02:00
pancake
7994af7fca Fix another crash in AnalJava 2015-05-11 16:45:15 +02:00
pancake
e85448208e Fix one overflow in the AnalJava plugin 2015-05-11 15:14:17 +02:00
pancake
2aecde26d2 Tons of free candy. See details below:
- Fix arm-thumb ESIL for the SUB instruction
- Handle Java imports as symbols in code analysis
- Invoke Java instructions reference the imports now
- Fix 71 crashes reported by jn
- Affected bin modules: elf, mach0, java, te, pe, dex
2015-04-13 00:57:32 +02:00
pancake
98fa19ac49 Handle ILL ops in anal Java 2015-04-10 01:28:02 +02:00
pancake
3a5600f7c5 Sync with latest capstone-next (fixes pkg-config issue) 2015-03-05 23:54:41 +01:00
jvoisin
55f5c73008 Coverifix++ 2015-02-19 12:59:13 +01:00
jvoisin
5ad3afb628 Coverifix 2015-02-11 17:55:25 +01:00