Commit Graph

2850 Commits

Author SHA1 Message Date
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
Riccardo Schirone
d6fd896a65 Remove other unused functions in RBin and make others static ##refactor 2018-11-07 10:52:32 +01:00
lzutao
b790439e28 Cast arguments to ut8 when feeding ctype.h functions ##refactor
The behavior of the `<ctype.h>` functions is undefined for negative
arguments (other than `EOF`). In such a situation, the argument should
be cast to `unsiged char` for safety.

References:
 - C Programming: A Modern Approach, 2nd Edition: page 612, chapter 23.5
2018-11-06 13:40:00 +01:00
radare
de309af4d6
Another minor cleanup in RBin and add R_TIME helpers 2018-11-05 16:38:41 +01:00
Stefan Ilic
4e8eed0158 RBinSection now lives in the heap ##refactor 2018-11-05 11:52:40 +01:00
Iru Cai (vimacs)
17b24cf4e3 Improve MSVC detection and demangling ##bin
* Fix language type detection logic in r_bin_load_languages()
* Set language as msvc when an import library that has "msvcp" is found
* Demangle symbols that have a dll name such as sym.imp.*.dll_*
2018-11-05 11:42:23 +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
radare
6bd61d0224
Fix last gf 4byte write overflow in ELF ##bin 2018-10-30 16:44:10 +01:00
pancake
30867cb834 Address morning ret2libc comments 2018-10-30 13:09:35 +01:00
radare
2f4e97d660
More code cleanup for RBin 2018-10-30 09:07:58 +01:00
radare
9f8158b803
Fix big allocation issue found by googlefuzz in ELF ##bin 2018-10-30 05:53:27 +01:00
radare
88e49ac207
Fix #11972 - fix null entry assert on mach0 libs ##bin (#11990) 2018-10-30 01:07:24 +01:00
a1ext
4e8e7de7b4 Fix unicode path issues in Windows ##windows 2018-10-30 01:04:47 +01:00
pancake
24b6f28a66 Eliminate unnecessary global in mach0 parser ##bin 2018-10-29 23:28:09 +01:00
radare
1322c13fe3
Parse the LC_MAIN in rabin2 -H ##bin 2018-10-29 21:39:54 +01:00
radare
386ac612e0
Fix googlefuzz crash caused by oob in shdr_link ##bin (#11980) 2018-10-29 15:43:13 +01:00
radare
d174f66f95
Refactoring and optimization for the RBin.language identification ##bin (#11944)
* More code cleanup and bring back bin.reload for the debugger
* Benchmark: swift: 23/9549 rcore: 17232/37147 (2-400x faster)
* For DVIA iOS app this is 1s less
* Demangle all the symbols, not just few
2018-10-27 05:01:09 +02:00
pancake
e4e0cdeffa Update some missing mach0 defines 2018-10-27 04:25:10 +02:00
Khairul Azhar Kasmiran
351c762c54 Fix #11922 - Allocate space for sentinel too ##bin 2018-10-25 18:28:48 +02:00
radare
55fa2c91e7
Fix a crash in the OMF RBin parser ##bin (#11938) 2018-10-25 16:08:51 +02:00
David CARLIER
da5da7b72c Lookup for golang and asan traces once ##bin 2018-10-24 18:47:29 +02: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
radare
744d47b5d8
Fix crash in fuzzed sega master system rom ##bin (#11921)
* clusterfuzz-testcase-minimized-ia_fuzz-5712659681378304.dms
2018-10-24 16:20:46 +02:00
pancake
3a7a7ba789 Fix ELF crash in clusterfuzz-testcase-minimized-ia_fuzz-6065450650697728.dms 2018-10-24 13:26:21 +02:00
davidpolverari
6742bbd2c1 Fix #11915 - Early null check in RBinObject.get_baddr() 2018-10-24 13:07:03 +02:00
pancake
60fe2dde8d Use r_return_val_if_fail in cxx detection 2018-10-24 13:05:29 +02:00
pancake
737a35e81f Fix crash in the MZ parser found by googlefuzz ##bin
* Add r_print_hexdump_simple()
2018-10-24 13:05:29 +02:00
pancake
c3092614ba Parse the mach0's requirements codesign slot ##bin 2018-10-24 13:05:29 +02:00
pancake
4d4ce2f49c Code cleanup in the mach0 parser ##refactor 2018-10-24 13:05:29 +02:00
David CARLIER
ce50039ce3 Fix #11870 regression in rbin internal api change. 2018-10-24 00:11:40 +02:00
Khairul Azhar Kasmiran
e94861a476 Fix entry0's hvaddr for ELF ##bin 2018-10-23 22:07:47 +02:00
davidpolverari
b47666b409 Fix #11881 r_list_length assert for o->libs ##refactor 2018-10-23 21:38:17 +02:00
pancake
e6d97d2b27 Fix last clusterfuzz report ##crash 2018-10-21 16:02:36 +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
pancake
c8c9891ee7 Revert "Fix #11869 by using r_bin_elf_p2v_new (#11876) ##bin"
This reverts commit 8115510ab2.
2018-10-20 19:00:41 +02:00
pancake
7d32c05f9a Initial import of the sys/meson-sdk.sh ##build 2018-10-20 12:26:07 +02:00
Khairul Azhar Kasmiran
8115510ab2 Fix #11869 by using r_bin_elf_p2v_new (#11876) ##bin 2018-10-20 12:22:38 +02:00
Khairul Kasmiran
c8515c7722 ie: set hvaddr of elf entry0 from hpaddr 2018-10-20 02:20:01 +02:00
davidpolverari
f57a12d6cd Fix #11553 - Remove the R_NOTNULL bad practice ##refactor 2018-10-18 13:10:34 +02:00
radare
8eba01c534
Support the new Apple Watch arm64_32 mach0 cputype ##bin (#11842) 2018-10-18 01:38:25 +02:00
radare
6edae0226d
Complete mach0.lc.toString for better rabin2 -H ##bin (#11837) 2018-10-17 11:31:08 +02:00
Anton Kochkov
71170a4e9c
PDB switch to R_PACKED and utN types (#11830)
Fix typo, use R_PACKED and use r2 types in the PDB parser
2018-10-17 17:18:18 +08:00
Anton Kochkov
647a6fa439 Clarify BIOS section mapping in comments 2018-10-16 23:47:29 +08:00
Anton Kochkov
6f312e03fc Improve BIOS images loading 2018-10-16 21:04:48 +08:00
pancake
4205cdabee Fix memory leaks in RReg 2018-10-16 00:17:44 +02:00
radare
0e6b1a3c8a
Fix #11807 - Fix segfault in idpi (#11823) 2018-10-15 19:38:21 +02:00
Asher Baker
33dab09e20 Support PDB ages higher than 15 (#11805)
`GUIDSTR_LEN` is currently set to 34, which gives 32 characters for the PDB GUID, 1 character for the PDB age (which is tacked on the end), and the null terminator. However, PDB ages are stored as a uint32, and can thus have a maximum value of `0xFFFFFFFF`, which requires up to 8 characters. PDB ages over 15 can easily be reached by automatic build processes using incremental linking.
2018-10-13 18:07:57 +02:00
Riccardo Schirone
8153422add gcc8 warnings (fixes #10338) (#11798)
* bin/format/pe: fix gcc8 warnings
* bin/p: fix gcc8 warnings
* io/io_r2pipe: fix gcc8 warnings and style
* clang-format: do not sort includes, it may break stuff
* use sizeof instead of macros
2018-10-13 01:32:20 +02:00
pancake
ca2611b6b9 Fix last covs 2018-10-12 12:26:33 +02:00
bannsec
4b69a0c0c7 Fix memleak in RBin (#11775) 2018-10-11 01:06:07 +02:00