mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-03 03:35:37 +00:00
Fix null deref in 'r2 -k -' (thanks maijin)
This commit is contained in:
parent
d11a2b42da
commit
905821f255
@ -563,12 +563,14 @@ R_API RCoreFile *r_core_file_open_many(RCore *r, const char *file, int mode, ut6
|
||||
}
|
||||
|
||||
R_API RCoreFile *r_core_file_open(RCore *r, const char *file, int mode, ut64 loadaddr) {
|
||||
const char *suppress_warning = r_config_get (r->config, "file.nowarn");
|
||||
const int openmany = r_config_get_i (r->config, "file.openmany");
|
||||
const char *cp;
|
||||
RCoreFile *fh;
|
||||
RIODesc *fd;
|
||||
const char *suppress_warning = r_config_get (r->config, "file.nowarn");
|
||||
const int openmany = r_config_get_i (r->config, "file.openmany");
|
||||
|
||||
if (!file)
|
||||
return NULL;
|
||||
if (!strcmp (file, "-")) {
|
||||
file = "malloc://512";
|
||||
mode = 4|2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user