radare2 icon indicating copy to clipboard operation
radare2 copied to clipboard

r_core_file_open_many is broken

Open swoops opened this issue 4 years ago • 2 comments

Environment

> date
r2 -v
uname -ms
Sat Jan  9 09:30:59 PM UTC 2021
radare2 5.0.1-git 25582 @ linux-x86-64 git.5.0.0
commit: c96f1f64d0cd1bf6dfbabe479925978f4f7894d7 build: 2021-01-09__21:28:20
Linux x86_64

Description

The r_core_file_open expects r_core_file_open_many will return a non-NULL pointer on success. However, r_core_file_open_many always returns NULL (and leaks r_list structure).

I am not really sure what is r_core_file_open_many should return. If someone can explain what should happen, I can attempt a fix myself.

Test

Zip is the only open many IO plugin I know of. So you can verify zipall does not work.

> r2 zipall://out.zip
r_core_bin_load: no file specified
[r] Cannot open 'zipall://out.zip'

swoops avatar Jan 09 '21 21:01 swoops

I guess this requires iobanks for a proper fix

condret avatar Feb 17 '21 18:02 condret

That's an abi breaking issue. In case you wanna fix it we are about to end this seasson soon

trufae avatar Oct 28 '23 06:10 trufae