Commit Graph

375 Commits

Author SHA1 Message Date
Alexis Ehret
5b1b0c0da6 Fix dead increments 2021-01-25 00:34:58 +01:00
Alexis Ehret
21c98d60ac Remove all dead assignment detect by clang sa (#310) ##rizin 2021-01-19 05:37:17 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
Riccardo Schirone
2d160f2509
Avoid sdb double headers (#17249) ##build
* Avoid duplication of SDB headers in libr/include

SDB is an external project and as such it should live in shlr. However,
for simplicity in dealing with the include flags, the SDB headers were
copied in libr/include as well. This patch just keeps the SDB files
confined in shlr/sdb and make sure various r_* libs use the headers from
there.

* Fix pkgconfig file generation
2020-07-21 10:28:43 +02:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
Riccardo Schirone
70e3d3bc56
Fix compiler warnings (#17046) 2020-06-12 10:26:55 +02:00
Liumeo
4ca3a5c54b
Fix LGTM alerts (#16645) 2020-04-20 13:59:15 +08:00
radare
5a1df188f6
Build fixes to make emscripten builds happy (#16406) ##build 2020-04-02 17:52:03 +02:00
Florian Märkl
0b5e78e923
Make size arg of r_file_slurp() size_t (#16221) 2020-03-15 23:34:38 +01:00
Florian Märkl
3ead80cca8 Remove Custom Analysis for Java (#15817) ##anal 2020-01-16 11:25:49 +01:00
Itay Cohen
29c1344ff3 Improve realname support for symbols (#15702) ##bin
* Initial implementation of libname for flags in imports
* Initial support for PE and real flag
* Read libname for PE exports
* implement pj for imports
* Remove imp. prefix from symbol names
* Fix r_core_bin_impaddr()
* Fix some mdmp import stuff
* Print libname in ii
* Fix some imp. checks and reloc meta
* Fix r_bin_filter_sym() for imports
* Use realname for noreturn check
* Fix asm.flags.real for direct calls
* Fix realname for direct calls with fcn
* Fix resolving names from ordinal

Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2020-01-12 03:09:12 +01:00
Khairul Kasmiran
84ce2a7d04 r_list_new() -> r_list_new () 2019-11-10 14:06:02 +08:00
Paweł Łukasik
d62ae602a4 Fix #15152 - Support old Java attribute format (#15317) ##bin 2019-10-20 23:44:15 +02:00
Florian Märkl
80c74d7aa7 Replace r_str_const* with RStrConstPool (#15300)
* Add RStrConstPool

* Replace RAnal.consts with RStrConstPool

* Remove useless r_str_const() calls

* Kill more r_str_const()

* Remove r_str_const() from Java

* Remove r_str_const() from Canvas

* Remove r_str_const() from mach0

* Remove r_str_const() from PE

* Kill r_str_const* completely
2019-10-20 12:31:45 +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
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
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
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
e04f31a313
Completely kill the msvc/ directory and the unix-specific includes workarounds 2019-03-19 17:34:02 +01: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
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
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
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
dav1901
f24556c189 Fix few clang-analyzer warnings (#12548) 2018-12-24 01:18:12 +01:00
dav1901
5b644dcb74 Minor cleanups/fixes (#12478) 2018-12-14 00:17:50 +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
David CARLIER
3aed538f7b Fiximg little clang warnings in various places. (#12439) 2018-12-10 11:55:35 +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
David CARLIER
260a9e64cc Couple of leak fixes, div by zero avoidance. (#12338) 2018-11-27 15:46:56 +01:00
radare
d05292e485
Fix 80 warnings coming from gcc8.2 (#12280) 2018-11-22 22:11:43 +01:00
dav1901
8e7aea3198 Minor cleanups (#12231) 2018-11-19 22:55:34 +01:00
dav1901
9b0fbf1ee4 Minor code cleanups - free/R_FREE/etc 2018-11-13 00:23:49 +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
5a0ca70d7e Fix a null assert in java parser and bring back the libr.pc.acr 2018-10-15 22:14:54 +02:00
David CARLIER
036db696d1 Fix couple of leaks. (#11716) 2018-10-02 15:24:27 +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
David CARLIER
1eae637f4b Fix #11424 attempt. (#11451)
Deduplicate java function entries.
2018-09-08 18:28:54 +02:00
Paul I
620affc89e Fix some warnings (#11152) 2018-08-20 14:52:02 +08: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