Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!cbosgd!gwspc!n8emr!uncle!jbm From: jbm@uncle.UUCP (John B. Milton) Newsgroups: comp.sys.att Subject: Bug in WINDY (parameters) Message-ID: <121@uncle.UUCP> Date: Wed, 21-Oct-87 01:14:24 EDT Article-I.D.: uncle.121 Posted: Wed Oct 21 01:14:24 1987 Date-Received: Fri, 23-Oct-87 06:55:40 EDT Reply-To: jbm@uncle.UUCP (John B. Milton) Organization: Just me and my computer, Columbus Ohio Lines: 36 I like to use windy to invoke vi so that when you get done editing you come back to the old text that was on screen (the original window). I get to vi with a ksh function: function vi { windy vi $*; } This worked fine as long as you only edit a few files. If you edit a large number files, windy will core dump. Once I figured out that the core dump was windy and not vi, I rompted right in there and fixed it! The author forgot that sometimes the parameter buffer can get VERY LARGE and did not dimension an array correctly. There are two arrays in the program. One deals with the soft key labels and SHOULD be 80 characters. The other is the parameter buffer. This should be NCARGS from sys/param.h. I peeked and found it to be 5120. Add: #include Change: char avname[81]; To: char avname[NCARGS+1]; Change: strncat(avname, av[i], 80); strncat(avname, " ", 80); To: strncat(avname, av[i], NCARGS); strncat(avname, " ", NCARGS); This brings up an interesting question: When one does a ktune, are the correct .h files updated? -- John Bly Milton IV {ihnp4|cbosgd}!n8emr!uncle!jbm (614)294-4823 (home, where the ATT 7300 [uncle] lives) (614)424-7677 (work, where the HP 9836 lives)