Commit Graph

1940 Commits

Author SHA1 Message Date
pancake
631db86543 Fix minor warnings and update sdb from git 2019-09-11 00:18:07 +02:00
karliss
5379c70e89 Fix memory leaks and other problems found by ASAN. (#14980) 2019-09-08 01:24:14 +08:00
GustavoLCR
1eef31a814 Fixes for dmh in Windows
* Get offset of important globals from ntdll's PDB
* Workaround some RtlQueryProcessDebugInformation hangs for Win10
2019-09-05 09:49:41 +02:00
radare
0c386b4121
Introduce anal.in=code (2x faster aar in some big binaries) ##anal (#14923) 2019-08-28 19:39:04 +02:00
Srimanta Barua
e7ef4e6d62 Fix crash in gdb client (#14897) ##debug
* Remove recursive handle_stop_reason call
2019-08-26 21:05:30 +02:00
radare
87308db077
Update capstone again (#14862) 2019-08-21 12:40:20 +02:00
Paul I
2556919857 Add clang-cl support (#14814) 2019-08-16 12:10:00 +08:00
GustavoLCR
04121a2ad8 Fix stack-use-after-scope (#14811) 2019-08-15 13:41:41 +08:00
GustavoLCR
87079ea21c Fix #14804 - Make sure anon structs have unique names (#14806)
* Also skip "union" to get type
2019-08-15 12:00:20 +08:00
Maijin
b22ca85d4e Remove sleep 10 (#14791) 2019-08-14 17:26:27 +08:00
radare
8915a0a515
Update capstone (#14780) 2019-08-10 00:07:36 +02:00
Slava
38a10d64fb Fix build with system capstone (--with-syscapstone) (#14753) 2019-08-03 18:00:12 -07:00
pancake
6fdbf5b1c2 Fix static-build without GPL code 2019-08-02 09:51:09 -07:00
radare
c93c094c40
Fix android-static ##build 2019-08-01 04:39:40 +02:00
Anton Kochkov
5b9215bff5
Fix #13633 - support nested unions (#14712) 2019-07-31 18:40:40 +08:00
GustavoLCR
6664b2ba39 More fixes to WinDbg (#14675) ##debug ##windbg
* Fix seeking (stepping now works)
* Fix more crashes
* Fix compiler warnings
2019-07-28 11:48:46 +08:00
Ayman Khamouma
848c94d577 Fix capstone symbols visibility 2019-07-28 01:32:52 +02:00
GustavoLCR
8a6a7ba852 Some fixes to windbg (#14666) #debug #windbg
* Fix #10505
 * Fix wrong register profile being picked
 * Fix use-after free(s) and null derefs
2019-07-27 14:29:02 +08:00
Florian Märkl
24d3a9cb5d Add r_parse_ctype ##parse (#14596)
* Add r_parse_ctype

* Add mpc to acr

* Readability

* Fix r_parse for acr
2019-07-20 12:50:27 +02:00
pancake
b32a09db05 Update capstone v4 and next 2019-07-18 04:06:01 +02:00
GustavoLCR
ec67532e5d Fix Windows Build (#14512) 2019-07-08 12:40:48 +08:00
radare
dc0892a1a0
Towards emscripten build fix (update sdb) ##build 2019-07-07 16:52:41 +02:00
lzutao
7b7f069c9e mesonbuild: Backport to python 3.5 ##build
Python 3.5 (the lowest version that meson supports) has no f-String
but only old %-formatting and str.format().
2019-06-26 12:11:06 +02:00
pancake
d2c3065b9a Upgrade spp from git 2019-06-21 20:47:05 +02:00
pancake
6b634e2889 Upgrade capstone-next 2019-06-21 10:49:37 +02:00
pancake
30cee7811e Rename r_bin_file_set_cur_binfile_obj to r_bin_file_set_obj 2019-06-16 23:35:12 +02:00
Paul I
0fa82921b7 Split types-windows.sdb.txt and add cc info 2019-06-09 16:00:04 +02:00
pancake
0b7ad22f8c Upgrade capstone from git 2019-06-07 14:34:17 +02:00
GustavoLCR
7a10af4057 Initial implementation of heap parsing for Windows (#14218) ##debug 2019-06-05 15:20:38 -04:00
radare
581609fad2
Update capstone from Git (#14175) 2019-05-28 15:53:30 +02:00
pancake
5d3706bc3c Update capstone5 from git 2019-05-20 18:34:11 +02:00
Srimanta Barua
e951ba787f Wait ~10s for response to qSupported packet. Send another qSupported (#14104)
packet on timeout. Do this 5 times, and then bail out.
2019-05-19 16:39:57 +02:00
Sergi Àlvarez i Capilla
6b5905d4f4 Upgrade cs5 to fix the arm64 disasm crash 2019-05-15 15:56:00 +02:00
Riccardo Schirone
66f7403245 Rewrite the RBuffer API to make it safer and adjust the codebase ##refactor (#13656)
* Reimplement r_buf_fread/fwrite
* Add slice buffer and introduce readonly field
* Do nothing if size is 0
* Prevents an overflow when 8 is subtracted from size.
* Fix ragg2 when patching outside currently existing buffer
* Implement r_mem_mmap_resize for systems where mremap is not defined
* r_buf_buffer can be called with no size arg as well
* Use size_t instead of ut64
2019-05-15 15:34:06 +02:00
Óscar Carrasco
31e7cf517a Fix includes from to ignoring dir.types ##types 2019-05-15 08:46:43 +02:00
radare
8ea835076a
Upgrade capstone-next and v4 (#14074) 2019-05-15 08:45:21 +02:00
David CARLIER
a51233bb3f Few more memory leaks fixes (#14072) 2019-05-14 22:09:08 +02:00
radare
500d46f58c
Fix linking for Android ##build (#14067) 2019-05-14 15:01:36 +02:00
radare
c5f4266f45
Fix spp warnigs (#14059) 2019-05-14 01:38:17 +02:00
Khairul Azhar Kasmiran
8d2b16d74f r_str_prefix() -> r_str_prepend() (#14048) 2019-05-13 16:16:13 +02:00
pancake
59c59afedd Upgrade capstone to fix the xacquire x86-64 prefix 2019-05-13 15:30:15 +02:00
radare
4c87ee714e
Upgrade to use sdb 1.4.0 (#14045) 2019-05-13 11:10:33 +02:00
radare
12c824cfd1
Automatically choose wget/curl/git depending on availability ##build
* wget/curl downloads use CS_ARCHIVE
* Code cleanup in capstone.sh
2019-05-13 10:25:17 +02:00
pancake
6f565adc2d Update capstone v4 and next branches 2019-05-10 13:43:23 +02:00
Anton Kochkov
36e9d25068 Ability to download capstone git as zip 2019-05-10 09:49:05 +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
fca642d483 Fix capstone5 meson build 2019-05-07 13:19:22 +02:00
radare
869b698c1c
Enable capstone5 at configure time option ##disasm
* Add --with-capstone5 configure flag
* Add use_capstone5 meson option
2019-05-07 12:47:27 +02:00
Riccardo Schirone
820e3dbe73
Improve r_buf_buffer and remove r_buf_get_at (#13676)
* Make r_buf_buffer return a ut8 and the associated size of the buffer
* Remove r_buf_get_at uses and make it static
2019-04-15 13:24:15 +02:00
radare
dba7a43f1d
Rollback to capstone4 until all bugs get fixed 2019-04-12 16:13:35 +02:00
pancake
e7d705fbd0 Fix meson build of capstone 2019-04-12 13:10:18 +02:00
radare
0ed7742073
Update capstone to use the NEXT branch ##disasm 2019-04-12 11:24:08 +02:00
radare
3c41cb7d7e
Another tcc crash fixed (#13599) 2019-04-01 03:37:39 +02:00
radare
7ffa72aaed
Fix #13552 - Crashes in tcc parser (#13566) 2019-03-31 00:32:14 +01:00
Anton Kochkov
bd9eb0138b
Add ut*/st* type shortcuts (#13550) 2019-03-29 08:22:55 -05:00
Riccardo Schirone
3f4580b031
Make buf field private in RBuffer (#13473)
* Fix pemixed build (and include it in meson build)
* Do not use base_priv in yank, it was wrongly used.
2019-03-26 20:32:53 +01:00
radare
f6457c96aa
Update capstone-master (#13496) 2019-03-25 10:56:54 +01:00
Wladimir J. van der Laan
f4eac702d4 Fix build on newer RISC-V compilers (#13459)
On gcc 9.x, `__riscv__` is no longer defined but `__riscv` is.

This is documented under C/C++ preprocessor definitions on
https://github.com/riscv/riscv-toolchain-conventions
2019-03-22 09:46:01 +01:00
Riccardo Schirone
b0ac77881e
Make other RBuffer fields "private" (#13444)
* Use r_buf_size to get the size of a buffer, not the private field

* Use r_buf_seek instead of adjusting the private cur RBuffer field

* use r_buf_read instead of r_buf_read_at(.., cur, ..)

* other r_buf_read_at/r_buf_read

* Fix RBuffer usage in REgg

* Wrong replace with r_buf_resize

* Other r_buf_resize fixes

* style fixes

* other style fixes

* Introduce r_buf_tell API instead of using seek

* other style fixes

* style

* style 2

* write_at(cur) == write

* fixes

* avoid changing test

* Make most RBuffer fields private

* Add some fixme comments

* still use base_priv in some places
2019-03-20 19:01:26 +01:00
radare
e04f31a313
Completely kill the msvc/ directory and the unix-specific includes workarounds 2019-03-19 17:34:02 +01:00
wangcong
b22d03613e Improve Makefile on macOS (#13431)
`OS` can have already be set to other values on user machines, `OS=` fits better here.
2019-03-19 11:43:13 +01:00
Anton Kochkov
89f6646bac Fix Meson build 2019-03-18 18:24:27 +08:00
pancake
08aec4a431 Update sdb from git 2019-03-18 10:38:00 +01:00
GustavoLCR
3fba693b91 Add support for UTF console input in Windows (#13338) ##windows
* Add support for UTF console input in Windows
* Convert ANSI input to UTF-8
* Convert UTF-8 to acp when calling ANSI version of functions
* Determine if Windows console output is UTF-8 on the fly
2019-03-18 16:05:38 +08:00
Riccardo Schirone
0948f9536b
Use r_buf_size to get the size of a buffer, not the private field (#13380)
* Use r_buf_size to get the size of a buffer, not the private field
* Use r_buf_seek instead of adjusting the private cur RBuffer field
* use r_buf_read instead of r_buf_read_at(.., cur, ..)
* Fix RBuffer usage in REgg
* Introduce r_buf_tell API instead of using seek
* write_at(cur) == write
2019-03-15 20:28:52 +01:00
Anton Kochkov
bb67b54f74
Remove CYGWIN & MINGW remnants (#13377) 2019-03-15 12:55:08 +08:00
radare
9740af7270
Update sdb (#13373) 2019-03-14 01:04:26 +01:00
pancake
a4dea9f266 Update capstone from git 2019-03-11 23:26:00 +01:00
Jörg Thalheim
8dbc4f4ebe Fix offline build: Remove duplicated curl line ##build
If the user already provides a capstone tarball, the buildsystem should not try
to download it again.
2019-02-21 10:20:55 +01:00
pancake
c5c93e6ff4 Upgrade capstone-master 2019-02-18 22:00:44 +01:00
radare
6290e4ff4c
Fix #13087 - Automatic NORELEASE mode, use curl if no wget ##build 2019-02-18 19:38:55 +01:00
radare
5c7eb0bb7c
Address comments in #13094 related to maxbbsize and maxfcnsize ##anal (#13102) 2019-02-16 12:11:13 +01:00
pancake
936efa6344 Upgrade sdb 2019-02-16 11:42:18 +01:00
radare
99fecb05c7
Fix capstone cloning and patching issues again ##build 2019-02-15 18:12:34 +01:00
pancake
821a533745 Fix x86 capstone patch 2019-02-13 23:23:48 +01:00
Anton Kochkov
3380ab8c64 Unwind capstone to safe commit 2019-02-14 01:01:02 +08:00
pancake
6d4b355990 Solve java regression 2019-02-13 16:46:31 +01:00
pancake
c3339b8f81 Fix #13067 - Crash in the java parser (java-read-off-by-one) 2019-02-13 15:04:58 +01:00
dav1901
3c654cf3dd Fix null-pointer dereference (#13074) 2019-02-13 09:16:31 +01:00
pancake
7f8495dea7 Fix some crappy regressions in capstone.sh 2019-02-11 16:15:23 +01:00
pancake
b30e7d1923 Upgrade capstone 2019-02-11 16:05:04 +01:00
Anton Kochkov
54f841a4d3 Small TCC bitfields parsing fix 2019-02-08 15:05:18 +08:00
Khairul Kasmiran
808c512325 Remove commented anon_sym init in tcc_compile() 2019-02-07 20:16:45 +08:00
Khairul Azhar Kasmiran
0f9e3beb9b Support typedef to anonymous struct in more than 1 header ##types 2019-02-07 12:40:05 +01:00
Khairul Azhar Kasmiran
b4178702c8 Support typedef'd (anonymous) structs ##types 2019-02-06 22:08:50 +01:00
GustavoLCR
06ad8f651f Fix hfs mounting for Windows ##fs 2019-02-04 13:06:53 -06:00
Maijin
e24612ac41
Switch to capstone master in Meson 2019-01-22 11:57:21 +01:00
pancake
0d5e0a0cdb Switch to capstone master 🤪 2019-01-22 10:34:56 +01:00
Lowly Worm
b08199cf6d rm stupid debug printf 2019-01-20 17:53:11 -08:00
Lowly Worm
fc3ec317ec add support for apple debugserver on amd64 2019-01-20 17:52:35 -08:00
GustavoLCR
d3d0d6db24 Implement sdb_js0n() without GNUC weirdness (#12829) 2019-01-18 11:28:56 +01:00
Riccardo Schirone
adab5e4302 Update SDB code and use ht_update_key API in RFlag (#12804) 2019-01-16 16:57:19 +01:00
dav1901
37ea17d1a2 Minor code cleanups/fixes (#12714) 2019-01-09 22:06:12 +01:00
Paul I
2b8ce91c9d Meson: Update capstone (#12669) 2019-01-06 13:45:48 +01:00
radare
bd84d0a83d
Update capstone again (#12659) 2019-01-05 15:28:12 +01:00
David CARLIER
ba83760f94 Various little code cleanup/ib fix proposal. (#12640)
Proposal to fix ib DF issue.
2019-01-04 14:05:16 +01:00
dav1901
ceeb25ce49 Minor code cleanups/fixes (#12595)
* Minor code cleanups/fixes
* use r_base64_encode_dyn
* Fix clang-analyzer warning(uninit var)
2019-01-03 00:30:06 +01:00
David CARLIER
2eb706029c Few code/cleanups mem leaks potential (#12591) 2018-12-31 00:21:47 +01:00
radare
c9e87787f1
Initial support for 6502 with Capstone ##disasm 2018-12-29 16:22:08 +01:00
GustavoLCR
7530895d0a Fix a few clang scan-build bugs (#12562)
* Removed unnecessary variable from libr/core/disasm.c
* Removed not necessary assignment in libr/core/casm.c
* Removed not used assignment in libr/bin/dwarf.c
* Rem. duplicate declaration and not used values
* Fixed potential memory leak in java/class.c
* Fixed potential memory leak in ragg2
* Removed unnecessary variable in visual.c
* Another potential memory leak in class.c
* Removed not used value assignment
* Fixed memory leak in dwarf.c
* Removed not needed assignments
* Remove more not used assignments
* Refactored where bin_sections gets arch & bits for clarity
* Removed more assignments that are not used
* Rem. more unused assignments
* Surround assignment with paranthesis
2018-12-26 12:54:12 +01:00
Anton Kochkov
930dfcd110 Switch to capstone 4.1 [meson] 2018-12-24 17:00:42 +08:00
radare
f924f8bc3f
Switch to capstone 4.1 (#12549) 2018-12-24 09:23:43 +01:00
dav1901
f24556c189 Fix few clang-analyzer warnings (#12548) 2018-12-24 01:18:12 +01:00
Florian Märkl
71e921b50f Sync SDB (#12547) 2018-12-23 18:44:56 +01:00
dav1901
21861d185a Remove unnecessary break (#12538) 2018-12-21 23:41:18 +01:00
dav1901
303a57bb85 Minor code cleanups/fixes (#12519) 2018-12-20 11:50:29 +01:00
dav1901
0a65d76eb8 Minor cleanups/fixes 2018-12-18 16:26:17 +01:00
iamahuman
7f380ae78d Make SPP less dependent on system(3) and popen(3) 2018-12-15 18:32:24 +01:00
pancake
fd2acacd2d Fix build 2018-12-15 17:36:26 +01:00
pancake
161f014369 Remove noisy warning in iso9660 2018-12-15 16:04:59 +01:00
pancake
f2c06575d8 Fix #12479 - negative disk_reads may not be allowed ##crash 2018-12-15 13:01:35 +01:00
dav1901
5b644dcb74 Minor cleanups/fixes (#12478) 2018-12-14 00:17:50 +01:00
radare
3fc815e755
Update capstone (#12470) 2018-12-13 01:09:01 +01:00
dav1901
3a24f6d8a1 Minor cleanups/fixes (#12467) 2018-12-12 22:02:32 +01:00
dav1901
97b94b3f94 Fix more clang warnings (#12458) 2018-12-12 12:22:36 +01:00
dav1901
024d65e288 Fix few more clang warnings (#12429) 2018-12-11 10:28:01 +01:00
dav1901
9a91f96101 Fix realloc misusages (#12433) 2018-12-10 11:56:12 +01:00
David CARLIER
3aed538f7b Fiximg little clang warnings in various places. (#12439) 2018-12-10 11:55:35 +01:00
David CARLIER
7bf0380e77 Further clang warning fixes (#12416) 2018-12-06 17:00:08 +01:00
dav1901
b88806f65f Fix more clang-analyzer warnings (#12424) 2018-12-06 16:55:09 +01:00
David CARLIER
2cd65e45b1 Fix couple of clang warnings/java plugin (#12404) 2018-12-06 15:19:58 +01:00
dav1901
ab17935659 Fix clang warnings (#12413) 2018-12-05 12:35:37 +01:00
dav1901
cdaa507e15 Fix more clangs (#12399) 2018-12-04 16:09:18 +01:00
radare
a3d181a8a0
Fixes spotted by clang-analyzer (#12391) 2018-12-04 10:45:46 +01:00
pancake
dfd3be3e48 Update the tiled webui from radare2-webui (just new dependencies) 2018-11-29 16:53:18 +01:00
David CARLIER
260a9e64cc Couple of leak fixes, div by zero avoidance. (#12338) 2018-11-27 15:46:56 +01:00
pancake
d7a7e9e57c Define __R2TINYC__ in our tcc fork 2018-11-26 01:36:17 +01:00
dav1901
a6b44e03fe Fix warnings (#12309) 2018-11-25 01:46:57 +01:00
radare
d05292e485
Fix 80 warnings coming from gcc8.2 (#12280) 2018-11-22 22:11:43 +01:00
David CARLIER
74da0eb115 Few grub/bochs fixes 2018-11-22 12:12:11 +01:00
Riccardo Schirone
f4bf35cc16
sync sdb to a3463734c6d656ab174b32ba0b64e77475edae29 (#12244) 2018-11-20 16:50:28 +01:00
Florian Märkl
7c0687b8fb Fix #12022 - Slow backtrace fixed by speeding up ptrace_wrap_func() ##debug 2018-11-20 01:13:30 +01:00
dav1901
8e7aea3198 Minor cleanups (#12231) 2018-11-19 22:55:34 +01:00
pancake
53635d59a0 Fix #12141 - minor leaks in grub code 2018-11-19 12:14:01 +01:00
dav1901
558a79cae7 Fix few minor leaks and remove dead code (#12201) 2018-11-17 18:19:04 +01:00
dav1901
c1f30de193 Minor code cleanups free/R_FREE (#12157) 2018-11-14 21:23:20 +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
dav1901
dfb9b0e5ae Fix minor leaks in ufs and mz 2018-11-14 01:57:23 +01:00
dav1901
8b83d03c99 Minor code cleanups free/R_FREE (#12145) 2018-11-13 23:41:28 +01:00
Anton Kochkov
8bc369ef3f Move CS_TIP to aquynh/capstone@f01c267f 2018-11-13 18:05:33 +08:00
dav1901
9b0fbf1ee4 Minor code cleanups - free/R_FREE/etc 2018-11-13 00:23:49 +01:00
David CARLIER
6c5d98b45c Fix grub minix plugin build. (#12131)
Using wrapper instead, and might be safe anyway
in case allocators impl change.
2018-11-12 16:57:16 +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
077b341a16 explicitly sign all bitfields 2018-11-11 16:10:15 -08: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
pancake
3738a97623 Fix several asserts and crashes when loading invalid reg profiles 2018-11-05 16:55:34 +01:00
lzutao
c42eb07241 Fix shellcheck warnings in capstone.sh 2018-11-05 14:00:33 +01:00
Stefan Ilic
4e8eed0158 RBinSection now lives in the heap ##refactor 2018-11-05 11:52:40 +01:00
Riccardo Schirone
936512916b Another RBin API cleanup ##bin
* remove R_API from functions not used outside of RBin module
* move not-exported functions to a separate private header
* move bin_private in i/private.h
* fix and use R_IPI
* fix mips_assemble
2018-11-05 11:25:31 +01:00
pancake
cc643a2ab8 Update SDB from git 2018-10-29 22:15:47 +01:00
Riccardo Schirone
c09ba158fe
sync sdb and adapt r2 codebase (#11953)
add improvements of SdbHt from sdb
2018-10-26 15:54:32 +02:00
radare
c50357fbe6
Fix the build of the iOS SDK ##build (#11884) 2018-10-21 14:56:56 +02:00
pancake
018de032ce Fix static build problem with ptrace-wrap 2018-09-09 05:59:24 +02:00
Florian Märkl
39d413de0f Sync ptrace wrap for musl (#11862) 2018-10-19 02:01:17 +02:00
radare
d3d6fc8494 Fix UBSAN unaligned struct issue in the tcc parser (#11846) 2018-10-18 11:51:29 +08:00
pancake
5a0ca70d7e Fix a null assert in java parser and bring back the libr.pc.acr 2018-10-15 22:14:54 +02:00
pancake
c4795fc766 Update SDB to fix last covs 2018-10-13 13:25:36 +02:00
Florian Märkl
0c0fee7b48 ptrace-wrap (#11723)
* Add ptrace-wrap
* Add r_io_ptrace* and r_debug_ptrace()
* Use wrappers instead of calling ptrace and fork directly
* Sleep while waiting in linux_debug
* Add ptrace-wrap Makefile
* Link io against ptrace-wrap with acr
* Define ptrace usages in r_userconf.h
* Conditional ptrace-wrap in acr
* Fix HAVE_PTRACE
* Some fixes for Solaris
* Fixes for FreeBSD
* More fixes for Solaris
* Style Fix
2018-10-12 12:20:18 +02:00
Riccardo Schirone
d6aab51c2b WIP: gcc8 warnings (#11795)
* arch/ebc: fix style and remove gcc8 warnings
* parse/parse_ppc_pseudo: fix gcc8 warnings
* parse/parse_mips_pseudo: fix gcc8 warnings
* anal/esil: fix strncat usage
* shlr/tcc: fix snprintf usage
* parse/parse_dalvik_pseudo: fix sprintf -> snprintf
* lang/vala: fix gcc8 warnings
* core/vmenus: fix snprintf usage
2018-10-12 12:17:29 +02:00
Riccardo Schirone
8b020619c8 sync sdb
sdb sync: add sdb_foreach_list_filter API
2018-10-11 09:53:22 +02:00
MK
b1b3b5e150 Fix #11777 C header file loaded using 'to' cmd causes Segfault (#11778) 2018-10-09 19:55:29 +08:00
pancake
305be74a8c Implement tej to print enums in json 2018-10-07 02:11:13 +02:00
pancake
be0b202c06 Fix #11750 - Do not git reset when capstone from release 2018-10-07 01:36:51 +02:00
pancake
a604c5bfff Git clone in quiet mode to shrink travis logs 2018-10-06 04:12:38 +02:00
Riccardo Schirone
e2278cc50f
sync sdb: some refactoring on how to access base SdbKv fields (#11741) 2018-10-05 15:21:46 +02:00
David CARLIER
036db696d1 Fix couple of leaks. (#11716) 2018-10-02 15:24:27 +02:00
pancake
92f5af1e79 Upgrade to the latest Sdb 2018-10-02 05:18:39 +02:00
David CARLIER
da3d1bb4cc Fixing few leaks. (#11707) 2018-10-02 00:21:29 +02:00
pancake
41ec949204 Fix #11112 - Rename {srwx,flags,perms} to perm. (-21 LOC)
Unify R_IO, R_BIN, R_BP, .. into R_PERM_* using 1 letter syntax
2018-09-22 11:31:45 +02:00
radare
51cb301641
Fix clusterfuzz-testcase-minimized-ia_fuzz-5672100065443840.dms (#11602) 2018-09-21 08:51:36 +02:00
radare
945e9566fb
Fix #11455 - Implement internal less pager with scr.pager=.. (#11548)
* Use full screen in r_cons_less (last line was not used before)
2018-09-17 12:15:12 +02:00
Khairul Azhar Kasmiran
7d60e051a2 Move CS_TIP to aquynh/capstone@e2c1cd46c0 2018-09-16 22:40:04 +02:00
David CARLIER
497148b0cd disasm leak fix & warning silencing. (#11475) 2018-09-10 15:47:47 +02:00
David CARLIER
1eae637f4b Fix #11424 attempt. (#11451)
Deduplicate java function entries.
2018-09-08 18:28:54 +02:00
Fangrui Song
6d115eac58 Optimize sdb_array_add_num (#11157) 2018-08-22 02:57:02 +02:00
Paul I
620affc89e Fix some warnings (#11152) 2018-08-20 14:52:02 +08:00
Fangrui Song
dcf7dc74af Optimize sdb_const_anext and sdb_array_contains (#11139)
time (repeat 10 ~/Dev/Bin/radare2/release/binr/radare2/radare2 -p t1 -c
'' -Q a.out) => 1.35s -> 1.28s
2018-08-19 15:51:27 +02:00
David CARLIER
c6f0342a41 Java plugin: add human readable version. (#11118)
When possible adding this to the lang value
of the javac compiler used with.
2018-08-17 12:25:42 +02:00
David CARLIER
ada6a28ed9 Fix #11102 Attempt. (#11108)
When attributes are not read from Java class, there
is a risk of pointer dereference when freeing
afterwards.
2018-08-16 11:04:01 +02:00
Rafael Rivera
3f0d377123 Ensure we use correct platform path sep (fixes #11063) (#11064) 2018-08-13 11:45:40 +02:00
Andry
dfc4734103 sdb update 2018-08-11 23:24:56 +02:00
Riccardo Schirone
4b2e1359ab
shlr/meson: use source path to store capstone directory (#10993)
* shlr/meson: use an option to chose whether to use builddir or not
2018-08-10 10:31:17 +02:00
Fangrui Song
66e1e1e415 meson: disable unused grub fs/*.c files (#10983)
The old versions of affs.c btrfs.c have warnings.
2018-08-08 09:04:23 +02:00
AsFaBw
84852de244 Fix 10811 - Improvements in gdbclient breakpoints (#10940) 2018-08-07 12:15:11 +02:00
Riccardo Schirone
201c360b10 meson: copy most of the stuff out of sdb dir (#10961)
we need to handle sdb meson.build file with subprojects. For now I'm
extracting most of its current content here, so that it will be easier
to update sdb later.
2018-08-07 12:12:19 +02:00
Fangrui Song
594a438741 meson: don't compile inclusion-only .c files (#10928) 2018-08-05 17:32:05 +02:00
Andry
6601ccb583 Fix #10895 - tcc infinite loop 2018-08-04 13:17:29 +02:00
Khairul Azhar Kasmiran
672b2a3850
Add hvaddr to iee(j) output; haddr -> hpaddr (#10899)
* iee(j): add hvaddr

* haddr -> hpaddr

* Minor realignment
2018-08-04 08:17:37 +08:00
pancake
0d6647e4f0 Add sys/meson.py --nosudo (use sudo by default) 2018-08-01 03:12:33 +02:00
pancake
7b66d5f9dd Java undefined opcodes must be lowercase 2018-08-01 00:57:36 +01:00
d4em0n
3524f8b8ca Fix #10813 breakpoint kind when send to gdbserver and fix continue/stepping in gdbclient (arm) (#10818) 2018-07-31 09:37:20 +01:00
pancake
8e2803c182 Fix #10855 - Update sdb 2018-07-30 11:07:12 +01:00
Riccardo Schirone
d98c5b9080
shlr/meson.build: use master branch for capstone on meson build too (#10832) 2018-07-30 08:51:47 +02:00
Riccardo Schirone
d37e35a7ad
fix switch from capstone next branch to master (#10815)
* fix switch from capstone next branch to master
* shlr/capstone.sh: re-clone only if different branch
2018-07-25 17:58:53 +02:00
Alyssa Milburn
2c8901752f Add gdb support for v850 (#10809) 2018-07-24 14:59:07 +02:00
Riccardo Schirone
961ae4323c shlr/capstone: update it to fix sparc issue 2018-07-24 15:28:42 +08:00
Riccardo Schirone
0ad5497c72 fix sstream-null capstone patch 2018-07-24 15:28:42 +08:00
Riccardo Schirone
97b20da54f capstone: use master branch since v4 has been merged there now 2018-07-24 15:28:42 +08:00
Paul I
b50080b363 Meson: remove build_always for custom_targets (#10798) 2018-07-23 19:39:58 +02:00
Riccardo Schirone
4c23d64380
shlr/meson.build: fix used capstone and download it in build directory (#10782)
* shlr/meson.build: fix used capstone and download it in build directory
* shlr/meson.build: check return value of run_command and use git-apply
2018-07-23 14:39:10 +02:00
pancake
7a8d2a4f75 Update sdb from git 2018-07-19 16:36:27 +02:00
Riccardo Schirone
c932d1abff
meson fixes (#10743)
* r2pm/meson.build: install r2pm
* meson.build: use system libraries when available
* travis: add fedora-sys to the list of things to test
* bin_nso.c: still include lz4.c when not on meson
* Dockerfile.travis: add required system dependencies to dockerfile
* meson.build: split zip_dep in libzip and zlib dependencies
* shlr/meson.build: zip needs zlib
2018-07-17 23:01:40 +02:00
pancake
5553f2ec34 Fix warning in type cast 2018-07-17 17:43:20 +02:00
pancake
9c83d304cc Fix several bugs in java class parser and recent changes in the disasm loop 2018-07-16 13:06:24 +02:00
pancake
29801802d1 Upgrade capstone 2018-07-16 09:43:33 +02:00
pancake
4eec87cdf6 More warnings fixed 2018-07-14 10:58:19 +02:00
pancake
2c85194e7a Fix some warnings 2018-07-14 10:45:55 +02:00
Riccardo Schirone
02f9ddefd1
plugins on meson build (#10716)
* asm: use path macros whenever possible
* meson.build: sync asm and bin plugins with Makefile
* shlr/meson.build: apply capstone patches
2018-07-13 18:19:56 +02:00
Riccardo Schirone
7572f315ea
meson improvements (#10617)
* meson.build: fix meson build when not on git
* meson.build: make capstone a dependency
* meson.build: make r_magic library optional
* meson.build: capstone include is already in the dependency
* meson.build: use dependencies instead of manual linking + includes
* meson.build: add travis
* flag/meson.build: include sdb dependency
* travis-script: print messages based on install system
* io/meson.build: add sdb as dependency
* syscall/meson.build: missing sdb dependency
* {parse,config}/meson.build: add sdb dependency
* travis.yml: pass INSTALL_SYSTEM var to docker
* {bin/shlr}/meson.build: add sdb_dep to r2java and bin
* install meson and ninja-build in r2-travis docker
* travis.yml: allow meson build to fail for now
* anal/meson.build: add sdb and java dependencies
* egg/meson.build: add sdb dependency
* travis.yml: meson build env should be also in the includes list
* core/meson.build: add java dep
* meson.build: use dependencies also to create main r2 dependency
* rasm2/meson.build: replace link_with with dependencies
* rasm2/meson.build: add sdb as dependency
* meson.builds: convert link_with to dependencies and fix tabs
* travis-script: change meson install prefix and set PKG_CONFIG_PATH
* travis-script: add lib64 to LD_LIBRARY_PATH
2018-07-09 16:58:38 +02:00
radare
dbd046be1e
Upgrade capstone (#10660) 2018-07-09 09:23:09 +02:00
pancake
cdbdcaf47b Fix #10602 - oobread crash in java parser 2018-07-04 17:14:04 +02:00
pancake
a55eda166d Fix #10595 - Fix another oobread in the java parser 2018-07-04 17:09:39 +02:00
pancake
ddc9d0a1ef Fix #10596 - oobread in java parser 2018-07-04 17:04:57 +02:00
pancake
aa04965546 Fix #10586 - Fix oobread in r_bin_java_enclosing_methods_attr_new 2018-07-04 16:59:50 +02:00
pancake
ad5699f63f Fix #10604 - another oobread crash in the java parser 2018-07-04 16:52:05 +02:00
pancake
862a089e43 Revert "Fix #10559 - Overflow in java class parser"
This reverts commit 9cc6dd8fb0.
2018-07-04 15:48:47 +02:00
pancake
afeac9bdca Fix #10603 - oobread crash in java class parser 2018-07-04 15:42:58 +02:00
pancake
812b96a66c Fix #10605 - Remove spaguetti and finish the null deref fix in the java class parser 2018-07-04 11:58:22 +02:00
pancake
d521ba905d Fix #10560 - oobread crash in java class parser 2018-07-02 13:11:19 +02:00
pancake
9cc6dd8fb0 Fix #10559 - Overflow in java class parser 2018-07-02 13:06:20 +02:00
pancake
18c9541216 Fix #10563 - Fix null deref in java 2018-07-02 13:02:59 +02:00
pancake
9d85d55b8d Fix #10561 - null deref in java 2018-07-02 12:56:07 +02:00
radare
e9ce0d64fa
Fix #10498 - Fix crash in fuzzed java files (#10511) 2018-06-27 13:56:59 +02:00
Brenton Morris
e25b62fb03 Fix a few memory leaks for windbg (#10504) 2018-06-27 00:57:56 +02:00
scrapbird
518f980f66 Storing thread entrypoint 2018-06-26 15:31:02 +02:00
scrapbird
c3ec296214 Implementing dpt for windbg plugin 2018-06-26 15:31:02 +02:00
Riccardo Schirone
2df06bd870 Fix ELF issue with null SHT entries (#10449)
* format/elf: extract function to avoid duplicated code
* format/elf: use ut64 to avoid errors in ELF32

Otherwise, while analyzing ELF32, -1 will be interpreted as the unsigned
value 0xffffffff, which is very different from -1 (0xffffffffffffffff).

* format/elf: fix symbols with shndx == SHT_NULL

Symbols with shndx == SHT_NULL should not be listed as symbols but they
should be available when other ELF structures (imports, relocs, etc.)
reference them.

This patch adds those symbols in the symbols_by_ord table but not to the
list of available symbols. Imports/relocs/etc. work by indexing symbols
by symbol index, so they are going to use the symbols_by_ord table and
make everything work.

Moreover, it refactors a bit the relocs function to avoid duplicated
code.

* bin: setimportd/setsymbold should clone the import/symbol
* bin/bin.c: free fields only when sym is not NULL
* format/elf: do not filter out symbols with size == 0 and consider sht_null symbols in shdr too.
* bin/bin.c: create R_STR_DUP macro and use it in _clone functions
* format/elf: when parsing symbols from phdr, stop at first UNK type/bind
* create some R_BIN defines to handle strings related to TYPE and BIND
  in RBinSymbols
* format/elf: add a doc
2018-06-26 13:48:53 +02:00
pancake
c979417eda Fix crash in hbo_class.c-6638_1.class 2018-06-25 09:28:20 +02:00
pancake
a1d79aab1a Fix crash in fuzzed java hbo_class-6223_2.class 2018-06-25 09:28:20 +02:00
pancake
367a541ea8 Fix null deref in fuzzed java classname for npe_r_class.c-1576_1.class 2018-06-25 09:28:20 +02:00
pancake
69371fa6f9 Fix crash in hbo_class-6223_1.class 2018-06-25 09:28:20 +02:00
radare
e766c7dfeb
Upgrade capstone from git (#10471) 2018-06-24 21:53:57 +02:00
pancake
5ba902b95c No imports with spaces on Java, even on error 2018-06-20 16:26:58 +02:00
pancake
19f6cea471 Fix #10409 - heap oobread in java class 2018-06-20 16:14:01 +02:00
pancake
2153021aea Upgrade capstone dependency 2018-06-19 14:48:42 +02:00
Francisco Lopes
21634c7f83 Add Windows 10 (April 2018 Update) WinDbg profile (#10333) 2018-06-16 18:20:03 +02:00
pancake
bceeb37213 Update capstone patch 2018-06-11 02:57:22 +02:00
pancake
afe3792d0f Force embed-bitcode on iOS builds
- Fix typo and improve ios-sdk build
- Don't let capstone set the -arch flags
2018-06-10 03:38:28 +02:00
David CARLIER
19160ff217 Fix macros redefinitions warning (#10284) 2018-06-07 09:41:55 +02:00
David CARLIER
a20078d171 Adding backtrace support to FreeBSD from 10.x release. (#10256) 2018-06-04 16:05:13 +02:00
pancake
d608edffeb Upgrade capstone 2018-06-03 18:17:32 +02:00
radare
f6a04b34c8
Optimize ls_empty() and r_list_empty() (#10244) 2018-06-03 02:20:28 +02:00
pancake
cbeff990a1 Fix last covs 2018-05-30 12:41:57 +02:00
pancake
9473ef7b75 Upgrade capstone 2018-05-30 11:06:56 +02:00
pancake
f933b7fe87 Upgrade sdb to fix a crash 2018-05-28 18:18:47 +02:00
David CARLIER
91d857386b Silent pointer arithmetic warning for capstone (#10206) 2018-05-28 11:03:19 +02:00
pancake
4a3057f9fc s/\r\n/\n/g 2018-05-21 22:13:07 +02:00
sivaramaaa
97de3ff035 Manage types enum more properly (#10139) 2018-05-21 01:54:50 +02:00
Giovanni
855eb16d93 Refactor evars asm.lines.* (#10085)
* asm.linesout > asm.lines.out
* asm.var.submin fix
2018-05-18 10:29:00 +02:00
Paul I
7e9f982849 Meson: some cleanup (#10076) 2018-05-16 10:24:35 +02:00