Commit Graph

295 Commits

Author SHA1 Message Date
Paul I
40b4a5b557 Meson: disable libversion info for Windows (#9858) 2018-04-10 22:44:54 +02:00
Paul I
ca3652da4b Meson: Add version info for shared libs (#9763) 2018-03-24 18:18:32 +01:00
Paul I
4e73ad7d19 Meson: some cleanup (#9753) 2018-03-23 07:47:46 +01:00
Gromimousse
a5c9fc7855 Ragg2-cc -> Ragg2 merge (#9658)
- change of 'access' function for 'r_file_exists' for windows portability
- several changes in the way ragg2.c is done, see PR #9658 pancake comments
- change function for the remove of 'file'.text
- open changed for r_file_dump
- some elt of cEnv_t are now const
- skip all the pointers verification in set_cEnv but do them in check_cEnv instead
- add 2 r_str_sanitize for file and CC in parseCFile
- rewrite the removal of .o, .tmp, .bin, .s files, with cleaner code
- changed the long command with sed and grep to 2 C functions.
  - The function parseCompiled that basically does what the command was doing
  - And r_str_stripLines that is equivalent to "grep -v" (maybe we should put this one in str.c ?)
- simplify a bit getCompiler function with a const char* array
- add ternary operator for armOrMips condition
- use r_file_path for finding path to compilers
- new file created in libr/egg which contains all the C file parser
- modifications of 2 files to match the change :
  - libr/egg/r_egg.h
  - libr/egg/Makefile
- the function r_str_stripLine is simplier (the mallocs wasn't needed)
- the function r_str_stripLine is moved to libr/util/str.c
- libr/include/r_util/r_str.h is changed accordingly
2018-03-15 11:48:21 +01:00
pancake
9c4dc3b3c7 Fix leaks in RSyscall.srdb 2018-03-14 12:41:39 +01:00
Florian Märkl
5e1f811ec0 Fix meson indentation (#9567) 2018-03-03 22:08:37 +01:00
Florian Märkl
95a1b75784 Install Headers and .pc Files with Meson (#9548)
Use meson pkgconfig for .pc files

meson 0.44

Install same headers as acr
2018-03-03 20:00:18 +08:00
Paul I
bb4f61580e Cleanup meson files (#9424) 2018-02-20 09:33:19 +01:00
pancake
5642883db9 Initial rework of sysregs 2018-01-24 15:12:33 +01:00
pancake
31d550a54b Introduce r_sys_prefix 2018-01-16 11:58:47 +01:00
pancake
303820dbac Initial purge of R2_PREFIX towards dir.prefix 2018-01-16 11:13:21 +01:00
Andrea Sindoni
f546e0751b Fix SIGSEGV in the encoder execution (#9168) 2018-01-09 22:04:25 +01:00
Andrea Sindoni
d42e48d05e Added the thumb exec shellcode (#9134) 2018-01-05 10:37:20 +01:00
Andrea Sindoni
f9efed9e9b Fixed NULL pointer dereference in the file egg.c (#9115) 2018-01-02 22:31:35 +01:00
pancake
019792d7ec Initial import of apia, the api analysis tool for r2
cd sys/apia ; make

checkout the directory out/ when finished, helps to identify unused
apis, unnecessary libraries linked, bad api usages, renamings, ...
2017-12-18 00:41:52 +01:00
Æde Symen Hoekstra
b581ff82f0 Fix small memory leak (#8910) 2017-11-30 00:49:23 +01:00
Maijin
4bb5c15faa r_lib_struct_t -> RLibStruct 2017-11-10 13:38:05 +01:00
pancake
fa99c914bf Fix #8713 - null deref in egg 2017-10-19 17:34:38 +02:00
pancake
a15925b980 Fix null derefs in egg + unnecessary null chk in xrefs 2017-10-09 12:23:13 +02:00
Jose Diaz
f1d7f821ff Removed global variables and fixed several leaks 2017-10-07 09:52:09 +02:00
pancake
3802266221 Fix crash in 22.22.22ddd d do@ 2017-09-30 18:41:29 +02:00
pancake
19f3e00482 Fix crash in .dd dd)ddd dddr{G 2017-09-30 18:24:24 +02:00
josediazfer
d3b27cc35e Supported for linux the followings commands: (#8611)
dm address size
dm- address
2017-09-29 13:05:58 +02:00
josediazfer
bacd615e0d Egg Issues (#8593)
* Fix pushing inmmediate args using the x64 arch
Added directive .rargX (ar0, ar1,...etc)

* replaced atoi() by r_num_math()
2017-09-27 11:29:15 +02:00
pancake
f805d0672a Fix warnings 2017-09-17 23:27:43 +02:00
pancake
6da1fa47bf Fix crash in dd A, dd .,,.,,, and in V||| and V```... 2017-09-15 16:59:51 +02:00
Giovanni
7b40f7aed1 16 more bugs fixed. most are mem leaks. (#8307)
* 1379261/1379262 Resource leak

* 1379258/1379249 Resource leak

* 1379020 Resource leak

* 1351565/1351564 Logically dead code, 1379019 Uninitialized scalar variable, 1379014 Operands do not affect result

* 1379017 Resource leak

* 1379016 Resource leak

* 1379015 Resource leak

* 1377414 Resource leak

* 1376336 Resource leak

* 1375800 Resource leak

* 1373505/1373509/1373504 Resource leak

* 1373496 Resource leak
2017-08-24 17:20:39 +02:00
pancake
fd7dfad154 More fixes 2017-08-19 17:16:54 +02:00
pancake
17752cdb52 Fix a memory leak found by coverity 2017-08-02 21:42:42 +02:00
pancake
01d3179a61 Fix #8068 - r2 -X is now -R and old -R is now -r 2017-07-31 14:08:06 +02:00
Anton Kochkov
246dd7f94a Fix more big memory leaks 2017-07-30 16:50:51 +08:00
SkUaTeR
c31d81da26 support for static build (#7822)
* support for static build
* improved sharard/static build
2017-06-28 22:54:40 +02:00
izhuer
590d855f78 Simplify rcc_mathop and fix a bug when operation starts with bit operation 2017-06-21 11:13:43 -05:00
ZHANG ZHUO
8e5f2154b2 fix an stupid bug when using r_str_newf 2017-06-20 16:15:18 +08:00
pancake
5af3ec4b66 Fix last covs 2017-06-18 01:11:11 +02:00
ZHANG ZHUO
1b14b1724b use r_str_newf to replace snprintf 2017-06-15 22:15:41 +02:00
ZHANG ZHUO
bc05187068 remove ugly NULL syntax 2017-06-15 22:15:41 +02:00
ZHANG ZHUO
e9da2b2ca0 reindent emit_arm.c 2017-06-15 22:15:41 +02:00
ZHANG ZHUO
1dde4782a7 handle escape string in arm assembel 2017-06-15 22:15:41 +02:00
Zohn_Z
76f0ce7c9f Several fixes for ragg2
* fixed some bugs in rcc_pushstr in egg_lang.c
* fix bugs when strings within ',' and strating with non-zero char
* fix some error fixes
* fix the segment fault when calling functions with arguments
* add support for directory in include
* make some little changes
* add support for include and alias
* add some debug eprintf
* fix wrong label bugs in "while" syntax and rename some label
* fix odd syntax in "while" and "if"
* rename the labels
* add support for if\-else
* make some little changes for pretty print
* take a snapshot before writing confusing mathop
* finish mathop
* delete some unnecessary code in if-else frame to bypass test
* reindent all the thing
2017-06-14 15:35:29 +02:00
SkUaTeR
dc7914644e Meson improvements 2017-05-31 13:38:47 +02:00
SkUaTeR
0596c1c08e Meson shlr libs 2017-05-30 18:38:19 +02:00
pancake
6758e3753d Remove configure-plugins dependency for the make meson 2017-05-26 02:43:53 +02:00
SkUaTeR
9a1337512a meson.build fixes to build with MSVC 2017-05-14 23:06:00 +02:00
pancake
b24281c9c5 More fixes for mingw 2017-05-10 15:32:34 +02:00
pancake
60f9667654 Remove support for bjam build system
- Delete all Jamroot files
2017-05-02 05:48:40 +02:00
pancake
fa671b9a16 Initial support for the Meson build system
- Integrated with current ACR
- Fix some stale fails got removed
2017-05-02 05:05:36 +02:00
davidpolverari
1fb422b532 Fix #6162 - Renames r_str_concat to r_str_append 2017-03-16 22:29:49 +01:00
pancake
79ab75c78f More builds fixes for less plugins 2017-02-02 13:25:17 +01:00
pancake
11f2c4fe4f Add more movk/movz/movn for the arm64 assembler 2016-11-15 11:57:48 +01:00
pancake
7fc002dfd9 Remove unnecessary call to impaddr() and some reindents 2016-11-13 01:40:44 +01:00
pancake
d41b577106 Fix #5924 - r_flags -> r_flag 2016-10-27 01:07:58 +02:00
pancake
aed798e003 Add some breaks in egg and bin 2016-10-26 23:46:41 +02:00
Álvaro Felipe Melchor
7ba81f6886 More work into ragg2 2016-10-02 23:46:57 +02:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
Maijin
7938640445 Move all /t/ from r2 to r2r 2016-07-27 19:19:30 +02:00
Maijin
c274afe748 Fix #3286 - Use stdbool.h 2016-07-12 22:15:19 +02:00
pancake
f96f00d62d Fix #5158 - Merge r_db into r_util 2016-06-17 12:19:16 +02:00
pancake
608b79d2b4 Finally fix the build on osx-ppc 2016-06-06 17:30:07 +02:00
Sven Steinbauer
547f8bbc5c Infer fixes Round 2 (#4993) 2016-05-24 22:22:15 +02:00
Damien Zammit
af0a865d9f WIP - Totally remove host endianness dependence
- Adds endian aware functions
- Removes references to host endian
- Uses binary detected endianness else tries LE and restricts by RAsmPlugin
- Fixes gdb debugger endianness when debugging BE qemu gdbserver

Signed-off-by: Damien Zammit <damien@zamaudio.com>
2016-05-04 23:42:17 +10:00
pancake
af78b8e37f More osx-ppc build fixes. Almost there 2016-04-28 14:33:51 +02:00
pancake
c9514302bf Fix some lifecycle memory leaks 2016-04-03 23:52:36 +02:00
pancake
cea9c6840c Initial mpc version of the ragg2 lang compiler 2016-03-11 11:24:11 +01:00
pancake
c9267523ac Fix memleaks in the ragg2 xor key thing 2016-03-06 23:38:09 +01:00
Pankaj Kataria
505756afcc Added default key for XOR encoding 2016-03-06 11:16:22 +01:00
DZ_ruyk
0e8b42787a Boring typo fixes
Can't -> Cannot (since most of error messages use second form)
2016-01-07 00:13:54 +01:00
Álvaro Felipe Melchor
5543f73cb1 Fix some covs 2015-10-29 23:39:49 +01:00
xambroz
d448260816 build cleanup focused on possibility to control the lib directories with the build parameters
needed mainly for RedHat/Fedora builds
2015-10-27 03:26:45 +01:00
pancake
fb622d66ed Handle iOS/WatchOS/Linux SVC imm in REgg 2015-09-19 19:13:22 +02:00
pancake
49975ccf95 Fix #3286 - Use stdbool.h 2015-09-14 02:08:31 +02:00
Jeffrey Crowell
603e13447c arm svc call should have 0 2015-09-01 23:09:20 -04:00
Jeffrey Crowell
3067f31b74 fix emit string for arm eggs
offset was off by 4
2015-09-01 23:00:24 -04:00
Jeffrey Crowell
a51a4110c2 r7 is the syscall register 2015-09-01 22:08:44 -04:00
pancake
74ce502bd5 Aim to solve #3219 ARM LDR analyzer issue 2015-09-02 01:40:12 +02:00
pancake
b321d7fd8c Fix local var and assemble of LDR instructions in ARM eggs 2015-09-02 00:58:39 +02:00
pancake
c8cb347a41 Fix string allocation issue for ARM eggs 2015-09-02 00:18:55 +02:00
pancake
58f12f31fc Use UDF16 as trap instruction for the ARM Eggs 2015-09-01 23:27:04 +02:00
pancake
a2b21a51ef Honor R_SYS_OS in asm.os eval var 2015-09-01 03:13:16 +02:00
Jonathan Neuschäfer
523aa3af5c add .version to all plugins 2015-07-12 19:05:33 +02:00
Álvaro Felipe Melchor
3536b9cb63 Fix #2741 2015-06-11 17:43:27 +02:00
Álvaro Felipe Melchor
4514f7aee3 Fix a invalid read of size 4 in rcc_context 2015-06-09 23:27:05 +02:00
Álvaro Felipe Melchor
3c22b5ccab Fix #2732 2015-06-09 23:27:05 +02:00
Álvaro Felipe Melchor
78d5a78609 Fix COVS 2015-06-04 21:27:41 +02:00
Quentin Santos
5e7f8e9fd8 Save raw binary changes to ragg2 buffer, fix #2336 2015-05-13 22:55:52 +02:00
Quentin Santos
e86769e428 Fix zero in egg buffer
Appending one too many character to the buffer effectively truncated it.
2015-05-13 22:55:51 +02:00
Quentin Santos
55305de3d4 Fix memory management in ragg2, resolves #2340 2015-05-09 10:41:38 +02:00
Anton Kochkov
7e79b198b1 Fix some more Coverity issues
Fix CID 1171365
Fix CID 1211169
Fix CID 1230038
Fix CID 1295063, 1295062, 1295061
Fix CID 1295070
Fix CID 1295068
Fix CID 12950067
2015-04-19 04:53:08 +03:00
Anton Kochkov
1479aeca8e Fix a few Coverity issues
Fix CID 1205204
Fix CID 1171365
Fix CID 1135001
Fix CID 1134921
Fix CID 1134848
Fix CID 1134840
Fix CID 1134824
Fix CID 1267983
Fix CID 1230038
2015-04-19 03:15:29 +03:00
pancake
2096e855ba Fix gs0 crash 2015-04-16 17:49:17 +02:00
jvoisin
07b9038e1a Refactor a bit r_egg_padding 2015-04-08 23:39:56 +02:00
pancake
ef6c71208d Fix tons of input crashes reported in #2220 2015-03-22 23:24:13 +01:00
pancake
515b2e77bc Fix about 40 COVs related to memleaks and buffer overflows 2015-03-21 01:27:54 +01:00
jvoisin
838c467724 Coverifix once again 2015-02-19 15:04:58 +01:00
jvoisin
b8cdd7c0f7 Even more coverifix 2015-02-11 21:51:13 +01:00
jvoisin
5ad3afb628 Coverifix 2015-02-11 17:55:25 +01:00
Jeffrey Crowell
bf943e8729 coverifix 2015-02-05 00:29:59 -05:00
jvoisin
95d9704498 More coverifix 2015-02-03 15:53:51 +01:00
JamesSullivan1
69c4a80e67 Fixed a pointer invalidation in r_egg_mkvar leading to an illegal free() 2015-02-02 01:41:37 +01:00
pancake
69b40d1afa Add ragg2 -n and -N and fix some bugs in r_buf and r_egg 2014-10-29 02:44:21 +01:00
pancake
92e85bf4c4 Fix linux-x86-64 shellcode (abspath) and make x/x work 2014-10-23 14:07:46 +02:00
pancake
7e1875e4ff Fix some warnings 2014-09-22 19:45:14 +02:00
pancake
dcbfaf5f88 Fix segfault in ragg2 -P -10 (thanks @maijin) (thanks @maijin) 2014-09-05 16:13:47 +02:00
pancake
30acdbf50c Refactor debruijn code and make it accessible from ragg2 -P 2014-09-05 16:03:40 +02:00
jvoisin
702ac741b9 More coverifix 2014-08-17 21:04:12 +02:00
pancake
b5b05837d1 Fix CID 1213703 2014-08-01 11:54:44 +02:00
pancake
7122cddc1f Fix #907 segfault 2014-05-09 17:49:16 +02:00
pancake
216c183b6e Remove tons of useless 'if (x) free (x)' 2014-05-09 17:40:28 +02:00
Anton Kochkov
09a8722efa Fix CID 1135016 2014-05-09 03:49:35 +04:00
Anton Kochkov
2add8d4429 Fix CID 1211169 2014-05-08 01:38:17 +04:00
Anton Kochkov
e4fbfe20d5 Fix CID 1211163 2014-05-08 01:38:17 +04:00
Anton Kochkov
eac804f345 Fix CID 1134931 2014-05-03 16:21:03 +04:00
Anton Kochkov
697e0ac485 Fix CID 1134930 2014-05-03 16:19:23 +04:00
Anton Kochkov
9c42749652 Fix CID 1134926 2014-05-03 16:10:32 +04:00
Anton Kochkov
baa6f0cbc2 Fix CID 1134888 2014-05-03 11:04:46 +04:00
Anton Kochkov
6d74150777 Fix CID 1134887 2014-05-03 11:03:24 +04:00
Anton Kochkov
b748df8de7 Fix CID 1134886 2014-05-03 11:01:36 +04:00
Anton Kochkov
f14f12e819 Fix CID 1134885 2014-05-03 11:00:15 +04:00
Anton Kochkov
65208ffb1f Fix CID 1134884 2014-05-03 10:58:56 +04:00
Anton Kochkov
0026a71fba Fix CID 1134883 2014-05-03 10:57:20 +04:00
Anton Kochkov
53d0c6ea55 Fix CID 1134882 2014-05-03 10:55:33 +04:00
Anton Kochkov
af05ccc31f Fix CID 1134881 2014-05-03 10:51:45 +04:00
Anton Kochkov
532fda4d08 Fix CID 1135016 2014-04-30 04:26:34 +04:00
Anton Kochkov
d5d32e333f Fix CID 1134490 2014-04-26 01:53:23 +04:00
Anton Kochkov
1e3adc38f8 Fix CID #1134961 2014-04-24 01:29:06 +04:00
pancake
ae20ea8132 Add ragg2-cc support for OSX-x86-64 2014-03-28 16:22:34 +01:00
pancake
51fb0a0581 Fix static typedef issues 2014-03-25 00:34:23 +01:00
pancake
57fcf95fbe Update sdb to fix close(-1) issue 2014-03-13 11:18:51 +01:00
pancake
bb7958342b Deprecate RPair API and ?k. Use SDB and integrate it with 'k' 2014-03-07 01:26:11 +01:00
pancake
9b9b04576f Purge all r_lib references 2014-02-20 22:16:23 +01:00
pancake
666ab166d1 Add 'cu' and 'arC', better 'cc' 2014-01-24 02:37:14 +01:00
pancake
f8824722b2 Fix double free 2014-01-16 00:41:47 +01:00
pancake
9f0d7e44d3 Fix some issues reported by coverity 2014-01-15 01:56:28 +01:00
pancake
38fc28f960 Added more Jamroot files 2014-01-03 00:13:46 +01:00
pancake
13ea5e467d More Jamroot files and move vm out 2013-12-31 15:57:52 +01:00
pancake
3b3bbbb916 Add more Jamroot files and move some plugs to r2-extras 2013-12-31 15:34:27 +01:00
pancake
9c1f5e73e1 Wip: Add more shellcodes for r_egg. 2013-12-22 00:42:15 +01:00
cquaid
bae7d3b970 Fix ragg2 emit_syscall and emit_string for x64. Also fixes parsedatachar()
Fix x64 emit_syscall()

Fix x64 emit_string() (sort of)

Properly adjust context in parsedatachar()

Adjust CTX
2013-12-05 14:52:54 -06:00
pancake
d025bd66f3 Fix #287 - ragg2 segfaults on uneven number of accolades 2013-10-24 00:51:26 +02:00
pancake
dece987ca3 Fix various bugs on 64bits (mach0 entry, assembler, ragg) 2013-09-14 02:42:02 +02:00
pancake
b59b8aa7e4 Add support for @naked in ragg2 2013-09-14 00:51:42 +02:00
pancake
d6de30eba4 More R_LIB_VERSION and initial r_asm_set_cpu() dummy api 2013-06-15 02:56:25 +02:00
pancake
3f1d3ba146 Better r_str_hash(), Fixes in CCa, Added ?h, Better rbin for BEOS bins
Identify Haiku binaries as 'beos' with noodle()
Fix CCa for non numeric offsets
Use sdb's r_str_hash() instead of old one (much less collisions)
Added ?h command to hash strings
CCa now appends instead of replacing comments
Do not mark as static if bin links to libs
2013-06-07 10:26:37 +02:00
pancake
3540924f40 Better paralelization of build system 2012-10-04 01:20:00 +02:00
pancake
69a12884ed Simplify the build system
doc.sw has been moved to radare2-extras
2012-10-03 14:31:35 +02:00
pancake
850045c329 Fix many bugs noticed during the training course
Fixed ragg2 -e segfault
Fix use of ragg2 -p
Fix memleaks and null derefs in rio and rsocket
Fix some build warnings
Fix the segfaults found in the ELF parser
Dwarf parsing is only done if bin.dwarf is true
2012-09-22 20:32:19 +02:00
pancake
884d35027d Fix segfault in ragg2 -e xor 2012-09-22 18:35:02 +02:00
pancake
be247348b5 Rename r_file_exist into r_file_exists 2012-09-06 08:59:13 +02:00
pancake
a8757a695f Fix android build and add r_core->anal_define api
Fix static build (libr.a)
Fix android build farm scripts
Build system is still hacky
2012-09-03 01:27:52 +02:00
pancake
10b4b5546c Fix resize command and more make race conditions 2012-08-14 01:25:50 +02:00