Fix null deref in r2 -c 'oc 3' - ##crash

Thanks @enovella for that valuable handfuzzing :D
This commit is contained in:
Sergi Àlvarez i Capilla 2021-11-05 16:49:12 +01:00
parent 693fcaaaea
commit e87d914f24

View File

@ -612,7 +612,7 @@ R_API bool r_core_bin_load(RCore *r, const char *filenameuri, ut64 baddr) {
}
if (!desc) {
// hack for openmany handlers
if (*filenameuri == '-') {
if (!filenameuri || *filenameuri == '-') {
// filenameuri = "malloc://512";
return false;
}