Path: utzoo!utgpu!watmath!watcgl!andrewt From: andrewt@watsnew.waterloo.edu (Andrew Thomas) Newsgroups: gnu.bash.bug Subject: Indirection through NULL pointer in bash-1.02 Message-ID: Date: 9 Jul 89 21:37:33 GMT Sender: daemon@watcgl.waterloo.edu Distribution: world Organization: University of Waterloo, Waterloo, Ontario, Canada Lines: 38 Using a uVax II under Ultrix 2.0: Bash 1.02 performs an indirection through a null pointer when given the line: Meta-TAB: expand-line in the .inputrc file. In the following diff, funmap[i] == 0, but on a vax, funmap[i]->name is not an error. No error is reported unless the value of funmap[i]->name is outside the process space. The following diff solved the problem for me, though it might not be the correct solution: *** readline.c.orig Thu Jul 6 13:36:14 1989 --- readline.c Sun Jul 9 17:12:00 1989 *************** *** 3797,3803 **** { register int i; ! for (i = 0; funmap[i]->name; i++) if (stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); return ((Function *)NULL); --- 3797,3803 ---- { register int i; ! for (i = 0; funmap[i] && funmap[i]->name; i++) if (stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); return ((Function *)NULL); -- Andrew Thomas andrewt@watsnew.waterloo.edu Systems Design Eng. University of Waterloo "If a million people do a stupid thing, it's still a stupid thing." - Opus