mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-04 19:47:31 +00:00
Fix oob in cmd_open test
This commit is contained in:
parent
f15618a706
commit
9da487344f
@ -2943,8 +2943,6 @@ static void bin_elf_versioninfo(RCore *r) {
|
||||
(ut64)addr, (ut64)offset, (ut32)link, link_section_name);
|
||||
int i;
|
||||
for (i = 0; i < num_entries; i++) {
|
||||
int num_val = 0;
|
||||
char path_entry[256] = R_EMPTY;
|
||||
char key[32] = R_EMPTY;
|
||||
snprintf (key, sizeof (key), "entry%d", i);
|
||||
const char *value = sdb_const_get (sdb, key, 0);
|
||||
|
@ -278,7 +278,7 @@ static void cmd_open_bin(RCore *core, const char *input) {
|
||||
r_core_cmd_help (core, help_msg_oa);
|
||||
break;
|
||||
}
|
||||
if (input[3]) {
|
||||
if (input[2] && input[3]) {
|
||||
char *arg = strdup (input + 3);
|
||||
char *filename = strchr (arg, ' ');
|
||||
if (filename) {
|
||||
|
Loading…
Reference in New Issue
Block a user