Commit Graph

13199 Commits

Author SHA1 Message Date
user.name
2e5e67ee08 Fix: regression in commit f0f54ad1c6 2016-12-02 18:20:19 +01:00
Álvaro Felipe Melchor
19724d5d89 Fix thumb/arm at entry when overlapp with symbol
entry points takes precedence
2016-12-02 17:49:46 +01:00
Álvaro Felipe Melchor
fc6000a8be Fix regression in fatmach0
$ r2 -a arm -b 64 mfan
Not enough data for SClassRoT
Not enough data for SClassRoT

mach0_classes.c handle the buffer of the mach instead of the whole
fatmach file. Thus we should revert physical addresses by obj->boffset on
sections.
2016-12-02 17:46:48 +01:00
Álvaro Felipe Melchor
35eb178c8b do not realign haddr in thumb mach0 2016-12-02 16:22:18 +01:00
Álvaro Felipe Melchor
4f8dcb3218 realign entry and set anal hints in arm mach0 2016-12-02 13:48:56 +01:00
Álvaro Felipe Melchor
884d2ddcc1 fix oob read in dwarf 2016-12-02 13:21:50 +01:00
Sven Steinbauer
e4b5f0f32b Cleanup opjc for x86_nz 2016-12-01 10:07:53 +00:00
pancake
13c15cb0a2 Fix #6268 - Deanonymize the AVR union 2016-12-01 10:54:35 +01:00
pancake
72e874c2ac Fix noreturn issue introduced with the flag_get_at aproximation 2016-12-01 10:48:00 +01:00
dequis
d505ecfacf anal: fix 'axf string ref' tests within axf.
Complements commmit 637e6db by reverting to the old axf behavior of
showing xrefs from a single address instead of the whole function,
but only if that specific address has xrefs. Otherwise it shows the
xrefs of the whole function

References #5113
2016-12-01 09:24:04 +01:00
pancake
5bb4568b55 Fix code injection vulns in new dmS 2016-12-01 09:20:02 +01:00
Ben Gardiner
97b3b86bba debug: new dmS command for listing sections of mapped libraries
This command is like dmi. It will list all the sections of the mapped
library by either shelling-out to rabin2 or calling r_core_info --
depending on whether filtering by library name was requested.

---
v3:
* more formatting (pancake)
* r_str_escape and quote the value passed in RABIN2_PREFIX env var (pancake)

v2:
 * formatting (pancake)
 * don't break out of the loop early
 * only strdup when I must [^1] (pancake)
 * I can't use r_sys_cmdf because then I can't filter the output with ~
    * reduce noise a little by calling r_sys_cmd_strf directly
 * iterate over the modules, not the maps

[^1]: The strdup of r_get_config(...,"bin.prefix") is needed because otherwise
we loose the original bin.prefix during the r_set_config(...,
"bin.prefix") calls in the loop.

review comments on dbg_maps
2016-12-01 09:15:22 +01:00
Ben Gardiner
4c890d0b52 config: fix double-free when setting bin.prefix more than once 2016-12-01 09:15:19 +01:00
Ben Gardiner
0269d63ff1 debug: fix db.maps.symbols.after.map.complete
This fixes a valgrind read past buffer error... I was seeing when
testing t.archos/Linux-x86_64/dbg_maps

```
Invalid read of size 8
==11424==    at 0x4C2F79E: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11424==    by 0x693C702: r_reg_set_bytes (arena.c:118)
[...]
==11424==  Address 0xa144430 is 0 bytes after a block of size 304 alloc'd
==11424==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11424==    by 0x5D49EE6: r_debug_reg_sync (dreg.c:60)
[...]
```

---

v2:
* don't forget spaces around '+' (pancake)
2016-12-01 09:15:16 +01:00
Ben Gardiner
b4158201c2 rabin2, sections: fix missing prefixes on -S (was working for -rS) 2016-12-01 09:15:13 +01:00
Gerardo García Peña
9adec9da86 SPM instruction (not tested). (#6274) 2016-12-01 09:10:34 +01:00
Elia Geretto
31e8d7cb68 Fix various memory leaks (#6272)
* Fix bits_ranges memory leak in anal.c
* Fix anal->reg memory leak and prevent use after free in plugin.c
* Fix reg->allregs memory leak in reg.c
* Fix dbg->plugins memory leak in debug.c
* Fix io->plugin_default memory leak in io.c
* Fix plugin_free not deallocating plugin in bin.c
* Adapt to style guidelines
* Fix memory leak in r_bin_object_free and resolve double free
* Fix o->kv memory leak in r_bin_object_set_items
* Fix memory leak pushing arena on reg init
* Fix io->plugin_default memory leak in io.c
* Adapt to style guidelines
* Fix pfile memory leak in radare2.c
* Add braces to if in bin.c
2016-12-01 09:09:59 +01:00
pancake
5463ce4934 Try to find strings in LEA references, not just flags 2016-11-30 18:00:23 +01:00
pancake
cb06c9c26b Fix #6270 - Honor current offset when assembling conditional jumps in x86 2016-11-30 16:22:34 +01:00
Maijin
57a6cc1daa Removing outdated line in doc
Removing outdated line in doc
2016-11-29 22:53:57 +01:00
Rakholiya Jenish
c7c1fad14f add all ioctl (#6265)
use PFMT64x

fix things
2016-11-29 14:00:58 +01:00
pancake
3fa97e94cb Fix latest covs 2016-11-29 11:52:24 +01:00
Gerardo García Peña
83d002cee5 Fixed flags in SUBI and SBCI. Implemented SUB. (#6266) 2016-11-29 11:22:10 +01:00
Gerardo García Peña
ed5ed8a1d2 New instruction swap (nibbles). (#6267) 2016-11-29 11:22:04 +01:00
Maijin
ffd8ecd14b Add remaining [?] 2016-11-26 14:57:21 +01:00
Sven Steinbauer
5851f6f117 Colour current node when using aga Fix #6260 (#6263)
Highlights the current block when using `aga` cmd too, using graph.current colour

Fix #6260
2016-11-25 17:23:24 +00:00
Anton Kochkov
b82b68cf7e Iprove Mingw32 build script 2016-11-25 18:52:57 +03:00
SkUaTeR
94a1c9ad80 fix launch in debug (#6261) 2016-11-25 16:26:59 +01:00
pancake
81c0cf5a9d Remove noisy eprintf 2016-11-25 00:59:40 +01:00
pancake
15685ec0bc Hide noisy xnu warning 2016-11-25 00:32:05 +01:00
pancake
ef3c39d10a Fix infinite loop in dsf 2016-11-25 00:16:31 +01:00
Maijin
fe83997742 Remove obsolete help for comment on args 2016-11-24 23:51:01 +01:00
Maijin
f6ac461207 Add recursivity help for a? commands 2016-11-24 23:46:20 +01:00
pancake
2982850c34 Fix VA boundaries 2016-11-24 23:37:47 +01:00
pancake
15b43564fd Manipulate stack.delta and stack.size with Vppc[jk+-.] 2016-11-24 23:25:49 +01:00
pancake
b835d2f87c Reload flags after aer= 2016-11-24 23:05:44 +01:00
pancake
60e7d284ed Fix issue with noreturn analysis 2016-11-24 22:39:23 +01:00
Gerardo García Peña
721934cbac More fixes for improving compatibility with several AVR cpus. (#6258) 2016-11-24 21:32:30 +01:00
pancake
e37739ebc4 Fix windows build 2016-11-24 16:56:11 +01:00
pancake
1854473b58 Fix #6256 - Move relocs to the fake virtual address 2016-11-24 16:23:03 +01:00
pancake
351d09ce7d Include current offset in sj 2016-11-24 16:11:43 +01:00
pancake
bd9477db89 Make r2naked happy with C++ 2016-11-24 13:21:56 +01:00
pancake
f3906c4e89 Fix wxf error message 2016-11-24 11:35:40 +01:00
pancake
77618565f5 Fix r_core.h for C++ 2016-11-24 11:25:21 +01:00
pancake
6f66cf9ee6 Fix sys/static.sh 2016-11-24 10:42:24 +01:00
Gianluca Pacchiella
f23113a473 avr/esil: implement subi. (#6255) 2016-11-24 10:19:15 +01:00
pancake
2aaf0b2d9d Fix #2924 - Add key in visual insert mode to remove or insert bytes 2016-11-24 04:46:01 +01:00
pancake
13bad8fd89 Fix RBinInfo for fatmach0s 2016-11-24 04:13:04 +01:00
Lowly Worm
9a8a69dbe1 enforce style guide (cmd_anal.c)
- use braces for all if statements
2016-11-23 19:57:23 -05:00
Gerardo García Peña
494202600e Improving support for several avr models. (#6253) 2016-11-24 01:21:52 +01:00