255 Commits

Author SHA1 Message Date
Sergi Àlvarez i Capilla
8bef293742 Add b64 handling for md 2021-10-26 11:40:34 +02:00
pancake
7a2c46dfa6
Always use b64 encoded filepaths on the fs.io calls ##fs 2021-10-26 11:27:59 +02:00
pancake
e80bc53cd6 Fix UB bug found randomly in the CI related to the mw command
* That was not spotted by valgrind or asan 🤦
2021-09-15 10:09:08 +02:00
pancake
819a13f816 Fix assert warning in r_fs_umount 2021-09-09 20:54:57 +02:00
pancake
d98abc6303 Random cleanup in fs code 2021-09-02 18:26:37 +02:00
pancake
ed495116e0 Use r_return in the r_fs api 2021-09-02 18:26:37 +02:00
pancake
23ad9b50ee
Fix #12335 - ignore system-installed r2 includes ##build 2021-05-28 00:45:48 +02:00
murphy
ec15814134 Fix 1446672 Resource leak 2021-04-13 20:09:33 +02:00
pancake
26d12a4404
Fix meson build issues related to grub (#18554) ##build 2021-04-09 19:54:55 +02:00
murphy
013d9123a3 Fix warnings and minor fixes due to code review 2021-03-17 11:16:51 +01:00
murphy
d7f9449aaf Fix 1447034 Resource leak 2021-03-17 11:16:51 +01:00
pancake
70839e7ef3
Add plugins=nogrub option for meson ##build 2021-03-11 12:39:47 +01:00
Murphy
6f091cfe73
Fix absolute paths and add r_return guards ##fs 2021-02-24 11:24:42 +01:00
Dennis Goodlett
4c8f20309d
Fix segfault in ms with blank line (#18369) 2021-02-16 21:01:36 +01:00
pancake
7d076a5b5a Fix fs.posix.cat and use r_sys_dir instead of reimplement (-48LOC) ##fs 2021-02-14 09:19:04 +01:00
Murphy
8245e459f4
Add support to stream files using mg (#18253) ##fs
* Fix return values to int
* Add support to mg to read files in chunks
* Add support fs_io plugin when read files in chunks
* Change return value to in in read and write of r_fs_plugin_t
* Refactor code of mg command to support streaming
* Truncate destination file if exists
* Removing warnings due to incompatible pointer
* Add offset and size optional parameters to mg cmd
* Fix mg arguments management
* Fix some return values in fs
* Fix and refactor code to read files by chunks using mg
* add format changes
* Using r_num_math to parse the args
* Fixing fs_r2 to remove some warnings
* Remove some debug messages
* Update libr/core/cmd_mount.c
2021-01-23 17:16:39 +01:00
Liumeo
c631443b9b
Remove strncat usage (#18229) ##refactor 2021-01-14 17:24:23 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
eagleoflqj
facdda17e3 cp-demangle - fix tcc build ##build 2020-11-27 12:36:59 +08:00
pancake
aa7de006e6 Fix TinyCC build ##build 2020-09-27 13:33:26 +08:00
Kārlis Seņko
7042ae727b Refactor r_str_split_lines to use size_t. 2020-09-21 07:48:17 +03:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +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
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
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
Liumeo
3b7f014040
pointer type mismatch warning (#16695) 2020-04-23 08:59:46 +02:00
Liumeo
dbc9d5e462
Fix 2 LGTM alerts (#16626) 2020-04-18 20:35:20 +02:00
Liumeo
2570a7b001
Add header guard (#16605) 2020-04-16 18:41:31 +02:00
radare
3f77b9a76b
Avoid duplicated module filenames to fix static.sh ##build (#16403) 2020-04-02 14:30:27 +02:00
Paul I
0e62dda341
Fix fgets() usage (#16068) 2020-02-29 20:47:10 +01:00
radare
1ac6209c88
Fix #14424 - Handle ~ operator in the ms shell ##cons (#15846) 2020-01-19 07:40:21 +01:00
pancake
db3ab7e3f9 Fix cannot mount fs harmless warning message ##mount 2019-08-04 09:29:36 -07:00
pancake
9f4f802cec Fix build --without-gpl 2019-07-10 19:45:34 +02:00
radare
dc0892a1a0
Towards emscripten build fix (update sdb) ##build 2019-07-07 16:52:41 +02:00
Francesco Tamagni
d4a48a50d8 Improve R_FS via IO ##fs
- add `r_fs_file_copy_abs_path` to get the absolute path of a RFSFile, centralizing edge case handling
- use that in `fs_io_read`
- add missing `free (file->path)` in RFSFile destructor
- fix `handlePipes` for fs shell `cat` use case
2019-06-28 02:36:25 +02:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
radare
a49bb7cf66
Change the signature of r_str_trim to avoid confusions ##refactor 2019-06-16 20:58:40 +02:00
radare
571a080ca7
s/CORELIB/R2_PLUGIN_INCORE/g (#14295) 2019-06-13 19:12:51 +02:00
pancake
90fd81ca81 Fix warnings here and there 2019-05-14 10:44:19 +02:00
pancake
305ddc46a9 Implement mw command and fix segfault on old fs support ##bin 2019-05-10 11:25:35 +02:00
pancake
d8b283f8c6 Improve the RFS API to support write and unlink operations ##fs
* In fs_r2: /seek and /bsize and fix flags and config writes
* fs.shell supports echo and redirections '>'
2019-05-10 11:25:35 +02:00
Anton Kochkov
bb67b54f74
Remove CYGWIN & MINGW remnants (#13377) 2019-03-15 12:55:08 +08: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
Riccardo Schirone
738bc9cb19 Fix warnings by using more r_str_ncpy
* Fix wrong logic in visual_search

When the string to be searched is wrapped in " ", you want to remove the
first and last quotes and look only for the internal string.

* Increase size to prevent string truncation (and fix compiler warning)
* Fix "destination unchanged after copying no bytes" warning
* Move msp430_register_names where it belongs to
* Fix Wstringop-truncation warning
2018-12-19 12:07:49 +01:00
dav1901
c7e6735105 Prevent double freeing (#12319) 2018-11-25 14:37:37 +01:00
dav1901
a6b44e03fe Fix warnings (#12309) 2018-11-25 01:46:57 +01:00
BlaCoiso
2af904856f Fix mount shell and ed commands (#12312) 2018-11-24 22:52:08 +01:00