Commit Graph

9 Commits

Author SHA1 Message Date
FXTi 1ffdedcd07
Add Python bytecode plugins (#16771) 2020-05-13 10:37:09 +08:00
Alexis Ehret ef07476e38
Fix various lgtm warning (#16497)
* Wrong type of arguments to formatting function root/shlr/mpc/mpc.c
* Overflow in uncontrolled allocation size ./libr/socket/run.c
* Multiplication result converted to larger type ./libr/core/cmd_print.c
* Multiplication result converted to larger type ./libr/bin/p/bin_dyldcache.c
* Multiplication result converted to larger type ./libr/core/linux_heap_glibc.c
* Multiplication result converted to larger type ./libr/core/visual.c
* Comparison of narrow type with wide type in loop condition ./libr/core/p/core_java.c
* Fix various warning -Wall ./libr/core/p/core_java.c
* Multiplication result converted to larger type ./libr/bin/format/mach0/mach0.c
* Multiplication result converted to larger type ./libr/util/print.c
* Multiplication result converted to larger type ./libr/asm/asm.c
* Fix small warning python
* Fix type error and declaration inside loop
* Reset mpc
* replace size_t
* Fix space missing, type and format
2020-04-12 20:45:24 +02:00
Riccardo Schirone 015ed58426 ELF plugin code cleaning ##refactor
* clang-format-diff: do not put space after Elf_
* bin/elf: remove warning because it's already printed by R_LOG_WARN
* bin/elf: rename get_static to is_static
* bin/elf: a bit of refactoring in init_dynamic_section
* Revert "bin/elf: other cleaning"
This reverts commit e39af6f69e.
* bin/elf: cleaning in r_bin_elf_get_sections
* bin/elf: refactor a bit get_sections_from_phdr
* bin/elf: fix create_section_from_phdr
* bin/elf: small style fixes in get_boffset
* bin/elf: simplify the code by using READWORD instead of #if/#else
* bin/elf: fix read_phdr because you need to pay attention to the order
2018-11-17 22:45:49 +01:00
Riccardo Schirone bb3d054c6d sys/clang-format-diff: other small fixes to the style script 2018-11-15 12:18:12 +01:00
Riccardo Schirone 5651cf58f4 clang-format-diff: improve modified lines detection 2018-11-12 10:30:01 +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
Riccardo Schirone 6115f00455
remove r_bin_load_io2 and rename MODE defines ##refactor
PR #11888 

* bin: no need for 2 r_bin_load_io APIs
* bin: remove io-related unused functions
* r_bin.h: remove some old comments
* r_bin.h: group together related APIs
* extract print/set modes in r_types, to remove dups in r_bin and r_core
* clang-format-diff: fix ternary operator indent for pancake
2018-10-24 16:54:57 +02:00
Riccardo Schirone 64d16fc506 Some code cleanup and asserts in RBin ##refactor
* libr/bin: no need to allocate RBinOptions on the heap
* bin: start using r_return_* around, that's just the beginning
* bin: remove io_owned since it's not used anywhere
* io: make r_io_bind return nothing
* bin: remove unused functions and simplify r_bin_load_io
r_bin_load_io was calling r_bin_load_io2 with UT64_MAX as sz parameter,
but r_bin_load_io2 just returns false if (st64)sz is less than 0, so
that call is actually useless and can be removed.
* bin/bin: fix some preconditions
* bin/open: fix precondition to check for bin and filename too
2018-10-21 01:27:15 +02:00
Riccardo Schirone 58ae11607a
Create script to apply style to diffs (#11261)
* restore tabs size to 8 chars
* fixes clang-format-diff for function declaration
* DEVELOPERS: explain pre-commit hook
* sys/pre-commit: do not consider unstaged changes
* sys/pre-commit: change doc
* create an example in doc
* suggest --no-verify
2018-09-26 10:49:16 +02:00