diff -up bash-4.1/bashline.c.crash bash-4.1/bashline.c --- bash-4.1/bashline.c.crash 2010-03-09 14:26:06.000000000 +0100 +++ bash-4.1/bashline.c 2010-03-09 14:46:10.000000000 +0100 @@ -1700,7 +1700,8 @@ globword: return ((char *)NULL); } - while (val = glob_matches[local_index++]) + /* make sure glob_matches is not NULL */ + while (glob_matches && (val = glob_matches[local_index++])) { if (executable_or_directory (val)) {