From f578de4d6d6f6f21cbd7f08da3d2c116a8996b58 Mon Sep 17 00:00:00 2001 From: dfr Date: Sat, 22 Mar 1997 14:03:08 +0000 Subject: 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(+) (limited to 'contrib') diff --git a/contrib/libreadline/complete.c b/contrib/libreadline/complete.c index f9e27eb..df17e49 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++) -- cgit v1.1