Fix oob in cmd_open test

This commit is contained in:
pancake 2018-01-10 12:29:15 +01:00
parent f15618a706
commit 9da487344f
2 changed files with 1 additions and 3 deletions

View File

@ -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);

View File

@ -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) {