radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.69k stars 3.01k forks source link

r_core_file_open_many is broken #18194

Open swoops opened 3 years ago

swoops commented 3 years ago

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'
condret commented 3 years ago

I guess this requires iobanks for a proper fix

trufae commented 1 year ago

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