--- bash-4.4-rc1/bashline.c 2015-12-30 14:53:23.000000000 +0100 +++ bash-4.4-rc1-1/bashline.c 2016-07-09 00:20:24.568169131 +0200 @@ -1281,7 +1281,7 @@ /* Handle the two character tokens `>&', `<&', and `>|'. We are not in a command position after one of these. */ this_char = rl_line_buffer[ti]; - prev_char = rl_line_buffer[ti - 1]; + prev_char = (ti > 0)?rl_line_buffer[ti - 1]:'\0'; if ((this_char == '&' && (prev_char == '<' || prev_char == '>')) || (this_char == '|' && prev_char == '>'))