205 Commits

Author SHA1 Message Date
Neven Sajko
d8784641ee Add parentheses in macros where needed for safety (#11290) 2018-08-30 13:16:50 +02:00
pancake
87eb500d32 Fix last coverity 2018-08-19 16:39:55 +02:00
radare
586bf7fc15
ragg2 *.c shows stderr and fix clang cflags (-Os makes non-pic code 🤦) (#11122) 2018-08-18 03:41:24 +02:00
Jacob Rosenthal
ef781d0add Check for macos as well as darwin (#11090) 2018-08-16 04:18:37 +02:00
Benjamin Levy
98fa58028a Add -fno-stack-protector to ragg2 CFLAGS 2018-08-01 00:55:18 +01: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
pancake
4a3057f9fc s/\r\n/\n/g 2018-05-21 22:13:07 +02:00
Paul I
7e9f982849 Meson: some cleanup (#10076) 2018-05-16 10:24:35 +02:00
pancake
9faa4f695b Fix crash in ragg2 for x86-64 (and spit 'dword' in mov) 2018-05-13 03:59:37 +02:00
Paul I
cc90ec6be5 [WIP] Move hardcoded paths to r_userconf.h (#9959)
* Move hardcoded paths to r_userconf.h

* Add R2_HOME_* macros

* Some cleanup
2018-04-28 10:02:55 +02:00
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