Skip to content

Commit

Permalink
fix oob heap read in on fixes #2807
Browse files Browse the repository at this point in the history
  • Loading branch information
crowell committed Jun 27, 2015
1 parent 731ef33 commit 584a0da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libr/core/cmd_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ static int cmd_open(void *data, const char *input) {
isn = 1;
/* fall through */
case ' ':
if (input[(isn?2:1) - 1] == '\x00') {
eprintf ("Usage: on [file]\n");
break;
}
ptr = strchr (input+(isn?2:1), ' ');
if (ptr && ptr[1]=='0' && ptr[2]=='x') { // hack to fix opening files with space in path
*ptr = '\0';
Expand Down

0 comments on commit 584a0da

Please sign in to comment.