Commit Graph

19401 Commits

Author SHA1 Message Date
Miles Whittaker
a32ba803f4 Scripted dynamic building of alpine docker image (#11515) 2018-09-16 23:05:03 +02:00
radare
486c61529c
Implement the "underscore command" 2018-09-16 22:50:56 +02:00
Neven Sajko
da6fba7fd8 libr/util/buf.c: Fix related to unsigned numbers (#11527)
Subtraction of unsigned numbers always yields a positive number, thus
R_MAX (0, b->length - b->offset) is always b->length - b->offset,
instead of the intended.
2018-09-16 22:44:11 +02:00
Paul I
a6464df206 Fix potential copy-paste bug in libr/anal/fcn.c (#11542) 2018-09-16 22:43:46 +02:00
Khairul Azhar Kasmiran
7d60e051a2 Move CS_TIP to aquynh/capstone@e2c1cd46c0 2018-09-16 22:40:04 +02:00
pancake
405cddffca Fix memleak, check off/len boundaries and return code from bufRead() 2018-09-16 21:08:52 +02:00
pancake
4410e26070 Implement Computed CDHash for mach0 binaries 2018-09-16 21:05:51 +02:00
Vanellope
48aa429a25 Save/Load layouts are somehow accidentally gone so got that back, plus more. (#11537) 2018-09-16 10:55:19 +02:00
Maijin
0a5eec6bed
Docs: divide code style with shellscripts and C
Docs: divide code style with shellscripts and C
2018-09-16 10:21:06 +02:00
pancake
eb4387c4d2 Delete sys/install-su.sh (implemented in install.sh with USE_SU=1) 2018-09-16 00:08:46 +02:00
pancake
d1e5b9a566 Remove sys/gtk* 2018-09-16 00:03:18 +02:00
Neven Sajko
9fadc2ab9f Put 'static' first in declarations (#11526) 2018-09-15 23:06:11 +02:00
Neven Sajko
751e144501 libr/util/uleb128.c: Fix left shift of negative value (#11528)
Those are formally an error (undefined behavior).
2018-09-15 23:05:53 +02:00
Paul I
bf29250ddd Fix #11487 (#11534) 2018-09-15 22:52:12 +02:00
Dimitris Karagkasidis
e238026086 Fix #11399 Use-after-free and a memory leak in handling of WASM binaries (#11533)
* Fix issue #11399: use-after-free in symbols()

Commit 7e083b57f introduced the issue #11399. The list referenced by
`codes` in entries(), is the same list that bf->g_codes is pointing at.
By freeing it, we introduce a use-after-free condition in a later call
to symbols(), where we try to iterate over the list that bf->g_codes
was supposed to be referencing.

* Fix memleak during loading of WASM binaries

A memory leak is reported by ASAN when handling WASM binaries. It is
caused by multiple allocations of RBinInfo structure. First, RBinInfo
is allocated within a call to size() from r_bin_object_set_items(). Then
there is another, explicit allocation of an RBinInfo structure through
a call to the info() callback of the WASM RBinPlugin. This causes loss
of reference to the initial structure, and subsequently a leak.

There are no apparent uses of RBinInfo structure inbetween these two
points, and the size() result is in no way dependent on this structure,
therefore I resolved the memory leak issue by removing the allocation
from within the size() function.
2018-09-15 22:51:38 +02:00
Maijin
e6eaa95c1d
Change -f help in ragg2 2018-09-15 19:52:38 +02:00
Maijin
4d12a2036c Remove restrict keywords 2018-09-15 18:39:56 +02:00
Neven Sajko
4014e938d6 libr/core/cmd.c: Fix related to unsigned numbers (#11530)
Subtraction of unsigned numbers always yields a positive number. Adds
casts to st64 to give the intended result.
2018-09-15 21:37:09 +08:00
Neven Sajko
8274d307de Fix signature of printf-like function (pointer) types (#11522)
The type signatures have to be compatible with printf.
2018-09-15 11:41:05 +02:00
Vanellope
a2794235c7 fixed left key that did not work well for multiple level of menu panels (#11529) 2018-09-15 13:55:09 +08:00
David CARLIER
fc2d054505 Fix golang binaries support. (#11525)
Spotted with go_stripped t/case
2018-09-15 13:53:08 +08:00
Michael Scherer
e18c16e714 Do not crash if a string with a size of R_NUMCALC_STRSZ is passed (#11498)
Since str is a fixed array of R_NUMCALC_STRSZ, str[i] will crash
with ASAN if i == R_NUMCALC_STRSZ, as it happen with the loop
and 'i++'

Fix another issue reported on https://github.com/radare/radare2/issues/11407
2018-09-14 16:58:37 +02:00
fcasal
0ad81b1a7f Detect golang by looking at golang sections. (#11520) 2018-09-14 14:54:00 +02:00
Riccardo Schirone
923b8ede06 README: add codecov badge (#11524) 2018-09-14 20:39:46 +08:00
David CARLIER
7ecbaafed3 Little update for sanitizer detection for ELF (#11521)
Spotted with FreeBSD and asan/tsan.
2018-09-14 13:00:40 +02:00
pancake
75b9f699d8 Remove rasign2 from the list of statically built binaries 2018-09-14 12:15:15 +02:00
Vanellope
c36181df55 Refactoring Panels: Use Sdb, cleanup callbacks and submenus (#11519) 2018-09-14 11:50:50 +02:00
Riccardo Schirone
bd5de316be Random fixes (#11503)
* core/panels: fix memleak
* cons: reintroduce change to correctly print multi-line help headers
2018-09-14 11:48:00 +02:00
pancake
d521843ae7 Use RStrBuf in pkcs/x509/asn1 APIs, use RCons from RCore to print that 2018-09-14 10:29:49 +02:00
pancake
e19835cbba Fix build 2018-09-14 01:51:00 +02:00
Giovanni
899719389f ASN.1 BER support, with pF[apx] (#11517) 2018-09-14 01:44:04 +02:00
pancake
d389cd4468 Fix sys/build.sh on Mac 2018-09-14 01:42:50 +02:00
condret
28a957da3d fix if-statement depth for esil expressions 2018-09-14 01:09:30 +00:00
condret
748785852d fix if-statement depth for esil expressions 2018-09-13 23:48:40 +00:00
Neven Sajko
07e1359daf libr/cons: Fix EOT handling (#11474) 2018-09-13 19:44:27 +02:00
rdjondo
d4de63a5b2 Make compilation on Raspberry Pi more user friendly (#11379) 2018-09-13 19:08:20 +02:00
condret
cb0704cf76 implement api for loading interrupt handlers in esil from inside of r2 and shared libs
thanks a lot to @vifino for doing tiny patches in io on my request and doing live code review
for me during the developement of this
2018-09-13 18:07:34 +00:00
Adrian Pistol
19819af40d Make r_io_plugin_{read,write}_at not seek character devices. 2018-09-13 17:52:00 +00:00
Adrian Pistol
5aa3d00778 Add r_io_{desc,fd}_is_chardevice. 2018-09-13 17:52:00 +00:00
Adrian Pistol
a6e38e9850 Add r_io_desc_open_plugin. 2018-09-13 17:52:00 +00:00
pancake
628a3c5ddf Fix Windows build 2018-09-13 17:22:29 +02:00
pancake
0d4e08aac4 Implement 'ls -e' 2018-09-13 16:45:31 +02:00
Dimitris Karagkasidis
15e1c3b89c Make the behavior of '.' command more consistent between visual and visual panels mode (#11510) 2018-09-13 16:08:21 +02:00
condret
c473dd75b2 The == operation should not push any value back on the stack, use $z and NUM for this (#10006) 2018-09-13 12:22:40 +02:00
David CARLIER
c64fb327e7 Detect binaries compilers with sanitizers (#11479) 2018-09-13 12:11:09 +02:00
radare
a33cba0697
Kill the _end section flags and fix flag size (#11349) 2018-09-13 12:10:02 +02:00
pancake
2b05518991 Fix memleak 2018-09-13 11:35:44 +02:00
pancake
885f9efeb0 Fix last covs and add $e{} in RNumCallback 2018-09-13 11:16:27 +02:00
Neven Sajko
8ee4c902fb Fix #10408 Implement bitwise rotations correctly (#11508) 2018-09-13 11:00:02 +02:00
Neven Sajko
c6e8b09352 Make r_sys_u?sleep use clock_nanosleep (#11410)
clock_nanosleep does not have effect on the action or blockage of any
signal and allows using a monotonic clock.

Usleep is removed from POSIX.
2018-09-13 10:30:35 +02:00