Commit Graph

165 Commits

Author SHA1 Message Date
Liumeo
d9000c0214
Fix ctime/asctime and refactor r_asctime_r ##refactor (#17911) 2020-11-12 12:25:33 +08:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +02:00
pancake
8b33d764a7
Fix #3929 - Enable LTO in sys/static.sh ##build (#17141)
* Fix #3929 - Enable LTO in sys/static.sh
* Update Ubuntu to 20.04 for static build
* Use `gcc-ar` when needed
* Do not use "c" option for ${AR}
* Use `$$AR` instead of `$AR`
* Aim to fix  `-dynamiclib` issue outside darwin
* Run tests for static LTO build

Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-08-13 13:55:39 +08:00
Riccardo Schirone
594b940b7c
Fixes some of the issues in Travis (#17267)
* Do not check with r_return_ if the convention is present

Let's just assume the NULL default in such a case, so that architectures
for which we don't have a defined calling convention can still be
processed somehow by the analysis code. It won't be precise, but it's
better than nothing.

Also add a warning message so users are aware when the calling
convention is not defined.

* Fix oob-read when # is at the end of the cmd string

* Do not set TMPDIR when the new value is the empty string

When TMPDIR is set to empty value, clang+ld behaves in weird ways and
you cannot compile files from within the r2 shell (e.g. when using #!c
or #!cpipe)

* Use meson and add -lasan to pkgconfig files when sanitizer are used
2020-07-16 20:47:30 +08:00
Eduardo Novella
8ebc8f265e
Add Android boot image magic (#17193) 2020-07-03 18:51:32 +02:00
Anton Kochkov
ffe743ef39
Fix #4056 - rename DEPS to R2DEPS ##build (#17020)
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
2020-06-12 10:49:28 +08:00
radare
3f77b9a76b
Avoid duplicated module filenames to fix static.sh ##build (#16403) 2020-04-02 14:30:27 +02:00
radare
6379317f57
Add LZMA-BE magic signatures ##search 2020-03-31 21:17:02 +02:00
pancake
5b8366441d Fix last covs 2020-02-28 17:38:51 +01:00
radare
307fb50c24
Fix a segfault in libmagic when error string > 4096 (#16050) 2020-02-25 15:55:00 +01:00
Riccardo Schirone
982be50499 Make it possible to use sysmagic again (#15658) 2019-12-16 23:24:29 +01:00
Anton Kochkov
a43cc2664d
Fix AppVeyor (#15623) 2019-12-13 04:58:16 -06:00
pancake
49e523937e Refix magic's bgets() 2019-12-12 18:11:52 +01:00
pancake
e7ae25fbfb Fix another infite loop in RMagic.loadBuffer() 2019-12-12 18:04:12 +01:00
pancake
8a8a28e4cf Fix bread in RMagic.loadBuffer() 2019-12-12 17:52:50 +01:00
radare
f680995474
Introduce the r_magic_load_buffer() api and boolify a bit ##search (#15617) 2019-12-12 17:12:33 +01:00
GustavoLCR
e43c9e7caf Fix some warnings (#15549) 2019-12-08 12:49:58 +01:00
pancake
b7c8f49744 Add protobuf magic 2019-07-26 05:30:21 +02:00
lzutao
24b5c6cb75 Fix warning when printing level of ">" (#14430)
* Strip trailing whitespaces
* Fix warning -Wstring-plus-int on cont_level
* Remove unused var
2019-06-26 12:09:59 +02:00
Amith Venugopal
4b29de061c End of archive detection in rafind2 -m ##search 2019-05-10 13:17:57 +02:00
Eduardo Novella
e9fe648bcd Android magic numbers until Android 9.x ##search 2019-04-27 17:47:11 +02:00
radare
e04f31a313
Completely kill the msvc/ directory and the unix-specific includes workarounds 2019-03-19 17:34:02 +01:00
Riccardo Schirone
afae8b6e34
Prerelease travis release (#13189)
* Add additional tests for release/prereleases
* Test different plugins configurations
* Add some libraries to docker image
* Disable SYS_CAPSTONE for now because there is only 3.0.5
* Fix html magic file to respect libmagic's format too

< can be used with string so it should be escaped if we want to match
the exact string "<html>"

* Use plugin License when printing rasm2 plugins in JSON format
* Build with system capstone, but do not run tests because they would fail
* Fix tiny plugins file to use xtr_fatmach0 instead of just fatmach0
* Use clang to compile with ASAN
* Use b_lundef=false
* Just test if different plugins configuration build, no r2r
* Use sys openssl as well
2019-02-28 16:58:09 +01:00
pancake
91496b9e10 Fix undefined behaviour in signed int with 24 bit shift in softmagic.c 2019-01-13 22:39:09 +01:00
lzutao
1365948cee Do not use reversed keyword of meson ##build
`files` is a reversed keyword in meson. Try to avoid using it.
2019-01-10 14:15:50 +01:00
Paul I
b2c7f7ef6c Some fixes (#12670) 2019-01-07 00:29:23 +01:00
lzutao
9cc6d2d291 meson: Do not use glob with meson ##build
* meson: Explicit is better than implicit
* meson: Fix deprecated warnings in Meson 0.49.0
* meson: Do not need separate array for installed files

libr/socket/meson.build:30: DEPRECATION: Library r_socket was passed to
the "libraries" keyword argument of a previous call to generate() method
instead of first positional argument. Adding r_socket to "Requires" field,
but this is a deprecated behaviour that will change in a future version
of Meson. Please report the issue if this warning cannot be avoided in
your case.
2018-12-27 14:17:54 +01:00
dav1901
f24556c189 Fix few clang-analyzer warnings (#12548) 2018-12-24 01:18:12 +01:00
pancake
077d01b006 Add magic headers for GPG symmetric crypto ##magic 2018-12-14 11:54:53 +01:00
dav1901
b88806f65f Fix more clang-analyzer warnings (#12424) 2018-12-06 16:55:09 +01:00
dav1901
cdaa507e15 Fix more clangs (#12399) 2018-12-04 16:09:18 +01:00
David CARLIER
2308897b3a Further meson warning build fixes. (#12290)
While here attempt fixing #12278 old version of file/libmagic.
2018-11-23 16:21:11 +08:00
dav1901
8e7aea3198 Minor cleanups (#12231) 2018-11-19 22:55:34 +01:00
radare
5f270658c5
New RBin plugin for "symbols" files ##bin 2018-11-19 22:54:58 +01:00
pancake
481ddade5b Add magic signature for LLVM IR bitcode files 2018-11-15 04:43:33 +01:00
dav1901
8b83d03c99 Minor code cleanups free/R_FREE (#12145) 2018-11-13 23:41:28 +01:00
Lowly Worm
80d87b9be4 fix format string called with too few arguments 2018-11-11 16:08:28 -08:00
Lowly Worm
8885dc4fd1 Call to gmtime is potentially dangerous, replace with gmtime_r 2018-11-11 15:53:08 -08:00
pancake
6c7bfd846a Add help in wtf!? and add bitcode magic signature ##magic 2018-11-10 02:44:24 +01:00
pancake
d2c7275155 Add magic signatures for llvm bitcode and xcode symbols 2018-11-08 17:29:43 +01:00
teresy
944aec4512 Remove redundant continue in for loops 2018-11-08 00:33:14 +01:00
Riccardo Schirone
ab4578a546
remove random warnings when compiling (#11767)
* remove random warnings when compiling

* debug_native: provide r_debug_handle_signals on windows
2018-10-08 13:21:50 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Riccardo Schirone
eee1385466
Meson private (#11331)
* meson: refactor library cflags
* meson: use visibility=hidden by default
* remove unused var
* magic/meson: replace tabs with spaces
2018-09-03 10:07:28 +02:00
Paul I
620affc89e Fix some warnings (#11152) 2018-08-20 14:52:02 +08:00
Riccardo Schirone
9a06b35277
meson.build: do not add "r_magic" as Require in pkgconfig if using sys 2018-07-18 15:50:02 +02: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
Anton Kochkov
e3d11b989c Fix Linux build 2018-06-11 11:02:49 +08:00
pancake
c52c7bace3 Fix #10300 - Link issues --with-sysmagic 2018-06-11 03:36:45 +02:00
Paul I
cad927a591 Meson: add rule for tags.r2 (#10215) 2018-05-28 23:25:48 +02:00