diff options
author | dfr <dfr@FreeBSD.org> | 1997-03-22 14:03:08 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1997-03-22 14:03:08 +0000 |
commit | f578de4d6d6f6f21cbd7f08da3d2c116a8996b58 (patch) | |
tree | d56709233c2c8801e55b2f1ba1e9edca46170c9f /contrib/libreadline | |
parent | 90027d0150af2b72f6ae09f8db21175330453548 (diff) | |
download | FreeBSD-src-f578de4d6d6f6f21cbd7f08da3d2c116a8996b58.zip FreeBSD-src-f578de4d6d6f6f21cbd7f08da3d2c116a8996b58.tar.gz |
Don't indirect through a NULL pointer in rl_strpbrk. This makes filename
completion work in GDB.
Diffstat (limited to 'contrib/libreadline')
-rw-r--r-- | contrib/libreadline/complete.c | 3 |
1 files changed, 3 insertions, 0 deletions
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++) |