Commit Graph

172 Commits

Author SHA1 Message Date
pancake
d7a4aedf5a Fix projects by removing code and honoring prj.name ##projects 2021-01-03 10:54:00 +01:00
pancake
8d4709bc0b Reworked P command with RProject and prj.name integration ##projects 2021-01-03 10:54:00 +01:00
pancake
898173aa38 Add RFile.new and RFile.move APIs ##util 2021-01-03 10:54:00 +01:00
pancake
cf91324937 Remove file.path and file.lastpath and add RProject ##projects 2021-01-03 10:54:00 +01:00
Qijia Liu
9e63a44c5c Fix memleak in r2 and test_big 2021-01-03 10:10:32 +01:00
eagleoflqj
2879c582af Use pj in cmd_info.c ##refactor 2021-01-03 01:24:58 +01:00
Liumeo
a637aa281d
Fix s390x rax2 -I & memleak (#18151) 2021-01-01 22:48:28 +01:00
pancake
f26a35a8dd
Use pj in radiff2 -j 2020-12-30 02:00:35 +01:00
pancake
4b6fd801e4
Import last random rizin fixes and more (#18128) 2020-12-28 23:34:16 +01:00
pancake
fdddd234bc
Implement rax2 -I to convert from/to LONG and IP Address ##print 2020-12-28 21:04:48 +01:00
Liumeo
55ce4ce303
Use pj in pdb_downloader ##refactor (#18084) 2020-12-21 23:46:12 +01:00
Lazula
f2976d3c7e
Use r_str_get_fail() throughout codebase ##refactor (#18079) 2020-12-21 08:51:44 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
pancake
89f6c6e1f1
Fix many ASAN issues, from uaf to memory leaks and some boolification (#18048) 2020-12-20 23:37:45 +01:00
Lazula
4a1a624318
Clean up r_num ##util ##refactor (#18049)
* Fix function spacing for r_num functions
* Remove r_num_ntohs
* Rename r_num_to_trits to r_num_to_ternary for
  consistency with surrounding code
* Rename trits to ternary in other files
* Fix spacing in test_contrbtree.c
2020-12-17 22:24:27 +01:00
pancake
2be5ff8762
Use r_core_cmd_str_pipe when using . in a panels (#17982) ##visual 2020-12-16 14:25:36 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
pancake
66bd6ed870
Remove globals in radiff2 ##build (#18022) 2020-12-12 20:22:18 +01:00
pancake
c2311d0a96
Remove globals from rafind2 (#18008) 2020-12-08 22:26:09 +01:00
pancake
b2f210a0cc
Fix asserts in r2 -a snes foo.sfc ##bin (#17990)
Co-authored-by: pancake <pancake@nopcode.org>
2020-12-04 12:16:09 +08:00
Liumeo
9015f12b8f
Fix SystemZ (S390) rax2 (#17934) 2020-11-19 11:48:53 +08:00
Anton Kochkov
87b10ed586 Fix formatting warnings 2020-11-02 18:58:37 +08:00
Aswin C
fd99114bca
Rename asm.filter to asm.sub.names ##cons (#17737)
* Rename `asm.filter` to `asm.sub.names`
* Rename tests for `asm.filter`
2020-10-01 10:13:58 +08:00
GustavoLCR
87b7be75e3
Fix rafind2 -m/-i/-E on Windows (#17740) 2020-10-01 10:13:38 +08:00
pancake
62c2128b6f
Better use of the R_SOCKET_PROTO_DEFAULT and add _NONE (#17644)
* Better use of the R_SOCKET_PROTO_DEFAULT and add _NONE ##http

* Fix regressions in: r2 -C and =+ ##r2pipe

Introduced in 04edfa82c1

* Implement sleep command ##shell

* Add tests for the webserver and remoting

* Implement daemon directive in rarun2, fix http test ##rarun2

* Fix socket timeout on Windows (patch by @GustavoLCR) ##socket

* Missing http.root is not a reason to not start the webserver ##http

* Fix r2 -C, =!=0, replace curl with r2 in the webserver test ##http

* Honor anal.in/from/to in aae, optimize db/formats/mach0/thumb ##anal

* Bug fixes and performance improvements

Co-authored-by: pancake <pancake@nopcode.org>
2020-09-25 19:51:23 +08:00
pancake
f71ec729ba
Always register the derived CC from the reg profile ##anal (#17685) 2020-09-24 17:17:15 +02:00
pancake
19f941509b
Fix rasm2 -L bits field for 4 and 0-bit plugins ##asm (#17686) 2020-09-23 13:31:56 +08:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +02:00
Zi Fan
ea1151d143
Escape environment vars in the default rarun profile (#17441) ##debug 2020-09-07 11:16:57 +02:00
pancake
e54b8d0092 Rename bin.demanglecmd to cmd.demangle ##config 2020-08-28 20:34:44 +08:00
Dennis Goodlett
ee133222fe
Add zignature spaces to ##rasign2 (#17404)
* Add zignature spaces to ##rasign2
* Update help information
* Use space API instead of core

Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-08-11 12:36:10 +08:00
Zi Fan
ac126508d5
Fix debugger to run debuggee with original environment variables ##debug (#17116)
* Change `fork_and_ptraceme` to start debuggee with rarun2 profile on Linux & Mac
* Add two new commands `doe` and `doe!` to show and edit rarun2 startup profile
* Fix `r_run_parse` to read last line
2020-07-24 16:25:55 +08:00
pancake
d441baad62
Fix latest COVs, remove dead code and unnecessary global variables (#17231)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-22 19:37:31 +08:00
pancake
c06d82eb9b
Fix #17229 - Refactor function that exports bin info add tests and fix segfault (#17232) ##bin 2020-07-20 12:18:38 +02: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
Riccardo Schirone
d6c9bd4542
Add support for binr/blob and fix android build ##meson ##build (#17150)
* Make sure meson can build with `system` = `android`.

* Add support for binr/blob in meson build

* Add also r_util as dependency

* Create sdb_version.py to get the SDBVER value from config.mk

* Set unknown sdb version if something fails
2020-07-05 10:53:37 +08:00
phakeobj
3f0cfff3d5
Fix incorrect ragg2 empty string check (#17202)
* Check for empty path string only if |file| actually exists
* Add a test that would have spot this bug in first place
2020-07-03 21:09:42 +02:00
pancake
37e10ee7b0
Initial support for git tags in r2pm ##r2pm (#17178)
* Initial support for git tags in r2pm ##r2pm
* Use `r2-` as tag prefix instead of `v`

Co-authored-by: pancake <pancake@nopcode.org>
2020-07-02 11:56:08 +08:00
pancake
d47aed440a
Fix covs from 2020-06-29 (#17184)
* Fix covs from 2020-06-29

* CIDs: 1293553 1408695 1430058 1430059 1430060
1430061 1430062 1430063 1430064 1430065 1430067

* More fixes

Co-authored-by: pancake <pancake@nopcode.org>
2020-07-01 09:33:38 +08:00
pancake
3acbe60fde
Implement rafind2 -F to find the contents of the file ##search (#17143) 2020-06-29 20:11:34 +02:00
pancake
f061b49c14
Fix all the covs (memleaks) reported the 15th of this month (#17163) 2020-06-29 09:40:35 +02:00
phakeobj
1abc5d0914
Bail early if path string is an empty string (#17126) 2020-06-27 23:03:44 +02:00
Dennis Goodlett
7575d05252
Fix leak in radiff2 on windows (#17120)
* Fix undeclared variable
* Fix leak in radiff2 on windows

Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-06-23 13:26:37 +08:00
Riccardo Schirone
a64cd12951
Fix wrong type warning (#17123) 2020-06-22 13:06:45 +02:00
pancake
bd9a604a87
Check for return values in about ~50 method calls (#17025) 2020-06-15 11:24:43 +02:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
pancake
84ecf9fff2
Fix all the coverities detected last month (#17060)
* Fix all the coverities detected last month

* Fix one more cov

* Fix build

* refix build

Co-authored-by: pancake <pancake@nopcode.org>
2020-06-14 13:21:57 +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
Dennis Goodlett
3d2f02be24
Add dumping of FLIRT signatures to rasign2 ##signatures (#16934)
Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-05-22 12:16:34 +08:00
pancake
5603366182
Be consistent and make all env vars start with R2_ (#16841) 2020-05-18 13:21:50 +02:00