2 Commits

Author SHA1 Message Date
Riccardo Schirone
9392fc7117 Fix some RBin file format crashes ##bin
* Use st64 and ut64 instead of size_t
* Fix mach0 parsing issue
* Fix OOB write in PE parsing
* Fix crash in bin_xbe parser
* Fix crash in bin_java
Fixes clusterfuzz-testcase-minimized-ia_fuzz-5740477602594816.dms
2019-05-30 15:45:52 +02:00
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