Awatmath.2171 net.bugs.4bsd utcsrgv!utzoo!decvax!watmath!kwlalonde Tue Mar 30 20:59:38 1982 Grep bug Grep recognises syntactically incorrect patterns, such as '[', and prints a diagnostic. It then goes ahead and tries to execute its compiled pattern on the input, resulting in infinite loops and other uglies. A fix is to exit after the diagnostic. diff oldgrep.c newgrep.c 186a187 > exit(2); Ken Lalonde ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.