Commit Graph

10 Commits

Author SHA1 Message Date
Riccardo Schirone
66f7403245 Rewrite the RBuffer API to make it safer and adjust the codebase ##refactor (#13656)
* Reimplement r_buf_fread/fwrite
* Add slice buffer and introduce readonly field
* Do nothing if size is 0
* Prevents an overflow when 8 is subtracted from size.
* Fix ragg2 when patching outside currently existing buffer
* Implement r_mem_mmap_resize for systems where mremap is not defined
* r_buf_buffer can be called with no size arg as well
* Use size_t instead of ut64
2019-05-15 15:34:06 +02:00
Riccardo Schirone
b0ac77881e
Make other RBuffer fields "private" (#13444)
* Use r_buf_size to get the size of a buffer, not the private field

* Use r_buf_seek instead of adjusting the private cur RBuffer field

* use r_buf_read instead of r_buf_read_at(.., cur, ..)

* other r_buf_read_at/r_buf_read

* Fix RBuffer usage in REgg

* Wrong replace with r_buf_resize

* Other r_buf_resize fixes

* style fixes

* other style fixes

* Introduce r_buf_tell API instead of using seek

* other style fixes

* style

* style 2

* write_at(cur) == write

* fixes

* avoid changing test

* Make most RBuffer fields private

* Add some fixme comments

* still use base_priv in some places
2019-03-20 19:01:26 +01:00
Riccardo Schirone
0948f9536b
Use r_buf_size to get the size of a buffer, not the private field (#13380)
* Use r_buf_size to get the size of a buffer, not the private field
* Use r_buf_seek instead of adjusting the private cur RBuffer field
* use r_buf_read instead of r_buf_read_at(.., cur, ..)
* Fix RBuffer usage in REgg
* Introduce r_buf_tell API instead of using seek
* write_at(cur) == write
2019-03-15 20:28:52 +01:00
dav1901
5b644dcb74 Minor cleanups/fixes (#12478) 2018-12-14 00:17:50 +01:00
David CARLIER
7bf0380e77 Further clang warning fixes (#12416) 2018-12-06 17:00:08 +01:00
xarkes
7db09c8543 Ar fixes (#8292) 2017-08-24 13:37:20 +02:00
pancake
4dd45b73e9 Fix some last covs 2017-08-23 16:45:05 +02:00
pancake
0b88ef654f More fixes in the output of 'o'
* Do not inverse the list
* Do not show maps in o output
* Fix om output
* Fix ar warnings
2017-08-23 12:55:10 +02:00
xarkes
ee4f42d13e Ar fixes (Added filename table) 2017-08-23 01:07:21 +02:00
xarkes
e900b49055 Added ar:// 2017-08-17 14:38:43 +08:00