From adce8de5c3bcb93df908ebbf51b89567629f3d91 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sat, 22 Mar 1997 14:03:08 +0000 Subject: [PATCH] Don't indirect through a NULL pointer in rl_strpbrk. This makes filename completion work in GDB. --- contrib/libreadline/complete.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/libreadline/complete.c b/contrib/libreadline/complete.c index f9e27ebddfb1..df17e497b74d 100644 --- a/contrib/libreadline/complete.c +++ b/contrib/libreadline/complete.c @@ -1528,6 +1528,9 @@ rl_strpbrk (string1, string2) { register char *scan; + if (string2 == NULL) + return ((char *)NULL); + for (; *string1; string1++) { for (scan = string2; *scan; scan++)