Without POSIXLY_CORRECT set, "stty erase -" (found in a script that meant to do
"stty erase ^-") causes stty to segfault. One line patch for sh-utils-2.0
below.
--- sh-utils-2.0/src/stty.c~ Sun Mar 28 19:12:17 1999
+++ sh-utils-2.0/src/stty.c Tue Jun 20 20:33:32 2000
@@ -671,7 +671,7 @@
{
char ch;
- if (*opt++ != '-')
+ if (*opt++ != '-' || *opt == 0)
return 0;
while ((ch = *opt))
- Re: small bug in stty Harry Liu
- Re: small bug in stty Jim Meyering
