Commit Graph

445 Commits

Author SHA1 Message Date
Álvaro Felipe Melchor
43e77cf459 Fix #6496 - add baddr and laddr in RBinXtrData 2017-01-14 16:15:52 +01:00
pancake
8bf80c35d4 Fix null derefs in i* when no binobj is loaded 2017-01-04 22:01:53 +01:00
pancake
44040638b0 Fix some overflows and null derefs reported by clang-analyzer 2016-12-20 00:48:02 +01:00
Álvaro Felipe Melchor
224b3c3319 fix some coverities 2016-12-18 23:41:55 +01:00
alvaro_fe
10fe20ede6 simplify the process of loading fat binaries
We avoid parse everything more than once and just when needed
2016-12-15 21:04:28 +01:00
Álvaro Felipe Melchor
a874de805e clean up code applying coding style 2016-12-15 21:04:27 +01:00
pancake
117b62e419 Rollback 370c50e2e8 2016-12-13 12:36:20 +01:00
pancake
370c50e2e8 Fix #6312 - Limit to 1GB files to be processed by rbin (workaround) 2016-12-13 02:15:18 +01:00
Álvaro Felipe Melchor
940c9a9bf1 handle more data sections in objc mach files 2016-12-07 13:09:08 +01:00
Álvaro Felipe Melchor
15022e85e1 clean anal hints when using xtr plugin 2016-12-04 20:41:56 +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
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
13bad8fd89 Fix RBinInfo for fatmach0s 2016-11-24 04:13:04 +01:00
pancake
3fb96ff37f Fix last COVs and hopefully make travis green 2016-11-23 10:25:00 +01:00
pancake
c6ffb3e9b6 Include address into the Class symbols for the C++ demangler 2016-11-22 14:58:42 +01:00
pancake
7b94a79dcd Initial support for C++ classes extracted from the demangler 2016-11-22 14:20:52 +01:00
Álvaro Felipe Melchor
87724384d1 added r_cons_break_{push/pop} to handle ^C better
Besides an UAF has been fixed afecting only ELF
2016-11-21 16:56:12 +01:00
pancake
28c7ec564a Implement bin.debase64 and RABIN2_DEBASE64 in RBin for r2 and rabin2 2016-11-18 13:29:36 +01:00
Álvaro Felipe Melchor
aeb5d1be4b Added help message when izz after -nn
When opening a binary with -nn internal structures are not initialized being
one of them RBinFile that is need to retrieve the info.

However, when opening an image for example RBinFile exist but we do not have a
corresponding plugin or binary format to say so we are able to get strings.
This will be need a great refactor to handle correctly and furthermore
something I did not like is that baddr is only accesible through RBinObject and
I think it should be within RBin at least.

This was working before cause rabin2 was being called but without -B as
parameter. I have resorted for eprintf message so the user can configure as his
need.
2016-11-07 19:47:56 +01:00
pancake
e7d10a716f Fix #6084 - crash in V! -> Close 2016-11-01 00:42:30 +01:00
pancake
94d47c79bb Completely remove all references to list.h 2016-10-27 13:33:27 +02:00
pancake
aed798e003 Add some breaks in egg and bin 2016-10-26 23:46:41 +02:00
pancake
b5fa7848ff Fix null derefs related to izzzq 2016-10-25 13:02:35 +02:00
Álvaro Felipe Melchor
a2befc8adc Enhance performance in r_anal_fcn_get_in() using tinyrange and sorted adds
* added sorted parameter in r_list
* use r_list_sort in r_range_sort
* some clean up
* added is_data into RBinSection
* use tinyrange by default to improve speed
2016-10-25 01:12:06 +02:00
Álvaro Felipe Melchor
c237950200 Fix #5968 - search string when malloc://X + wx 2016-10-19 23:02:39 +02:00
Álvaro Felipe Melchor
19f054840f avoid fork and r_core_new in iz commands
Changed the code to use C API instead of forking rabin2 or create a new core
instance. Besides, izz handles string from raw binary (without RBin)
2016-10-19 23:02:38 +02:00
Álvaro Felipe Melchor
b7ab1dbc07 remove unused variables to avoid warnings 2016-10-18 21:29:15 +02:00
pancake
e85f0c0e0e Implement experimental recursive help for d?? 2016-10-16 00:39:54 +02:00
pancake
bf6ea1dcc0 Fix crash when loading truncated mach0s 2016-10-15 23:54:17 +02:00
pancake
41d6e9edde Add bash autocompletion support 2016-10-04 14:34:06 +02:00
Sebastian Reichel
b98880ff26 Debian patches (#5866)
* Fix esil manpage

Each manual page should start with a "NAME" section, which lists the
name and a brief description of the page separated by "\-". The "NAME"
section is parsed by lexgrog and used to generate a database that's
queried by commands like apropos and whatis. Without this change
lexgrog fails to parse the NAME section of this manual page.

This was found by Debian's lintian tool (manpage-has-bad-whatis-entry).

* Fix empty input line in manpages

Found-By: lintian as manpage-has-errors-from-man

* Fix rahash2 manpage

.El (end list) is only valid after .Bl (begin list),
but no list was started in this section.

Found-By: lintian

* Avoid build break if no static bin plugins are defined

If one disables all static bin plugins, build currently fails,
since R_BIN_STATIC_PLUGINS/R_BIN_XTR_STATIC_PLUGINS are not
defined. This fixes the build for these kind of setups.

(In Debian does not built the mach code, since the
Apple Public Source License is not compatible with
the Debian Free Software Guidelines. Without the
mach code there is not a single binxtr plugin)

* Fix implicit declaration of function 'linux_generate_corefile' on i386

Noticed by Debian build farm.

* Add support for SOURCE_DATE_EPOCH

SOURCE_DATE_EPOCH can be used to make builds
reproducible [0].

Note: radare suffers from a second problem making the
build unreproducible: It captures the full build path.
This is *not* covered by this change.

[0] https://reproducible-builds.org/specs/source-date-epoch/
2016-09-28 19:17:43 +02:00
pancake
3986ea1fbb Aim to fix the sym loading regression in debugger 2016-09-26 17:33:08 +02:00
Álvaro Felipe Melchor
3a5444f3ca Fix warnings 2016-09-26 13:24:00 +02:00
pancake
59bf09a66a Refix oo to make travis happy 2016-09-26 12:53:05 +02:00
pancake
5c70e3fae1 Fix regression in rbin 2016-09-26 01:51:17 +02:00
pancake
1e89dddd87 Fixes in oa, asm.bits, avr and io debug issues 2016-09-26 00:46:20 +02:00
Marc
0c8556bb22 Fix some DEX disasm issues (#5829) 2016-09-23 00:33:25 +02:00
pancake
e2b14a50f3 Fix latest COVs 2016-09-21 11:30:29 +02:00
pancake
613c27f98f Implement cfstring support for ARM/Thumb binaries 2016-09-20 11:35:32 +02:00
pancake
e228e430e0 Add support for cfstrings and fix arm64 ADR analop for more refs 2016-09-20 00:43:06 +02:00
Álvaro Felipe Melchor
71d45f9a42 added coff in is_data_section 2016-09-19 17:34:49 +02:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
pancake
a59e0ce083 Fix crash in gdb:// and some oobreads 2016-09-13 02:38:08 +02:00
pancake
945d6690f9 Fix latest coverities 2016-09-01 12:39:32 +02:00
pancake
12a6469bbd Various fixes for the debug register state on XNU for ARM and x86 2016-08-31 01:57:36 +02:00
pancake
e04498ac02 Add rabin2 -X and r_bin_package for FAT and ZIP 2016-08-30 04:26:20 +02:00
Damien Zammit
3ae075cba9 rabin2: Fix check for binaries and as a result don't need to open twice (#5614) 2016-08-26 22:21:06 +02:00
Álvaro Felipe Melchor
0bc983027f improve arm/thumb in elf file format and disasm 2016-08-07 17:38:34 +02:00
pancake
7b0622f85d Fix latest covs 2016-08-01 14:46:17 +02:00
pancake
2bf4dc7ffc Fix #5426 - r_bin_list uses RCons now 2016-07-30 19:17:17 +02:00