🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Steve Lademann Thu, 24 Apr 1986 11:54
Bug in vanilla System V terminfo
#300
Author: Steve Lademann
Date: Thu, 24 Apr 1986 11:54
28 lines
1738 bytes
There is a 'lurker' in the terminfo supplied with vanilla System V.2
which exhibits itself by causing a process using the keypad code in
terminfo to occasionally core dump mysteriously. On editing in some
debug information, it stops core dumping.

This is due to a bad condition on a 'for' loop at line 111 (or
thereabouts).  The condition reads.

		for(i=0; SP->kp[i].keynum >= 0; i++)

which causes it to whiz off through memory looking for a key which is
numbered negatively, whereas the code marks the entry after the last
key in the array as 0.

The (obvious) cure is therefore

		for(i=0; SP->kp[i].keynum > 0; i++)


-----------------------------------------------------------------
|Steve Lademann		|Phone:	44 727 59292 x326		|
|Marconi Instruments Ltd|UUCP : ...mcvax!ukc!hrc63!miduet!steve	|
|St. Albans		|NRS  : steve@uk.co.gec-mi-ate.mifnet	|
|Herts.   UK		|					|
-----------------------------------------------------------------
|"The views expressed herein do not necessarily reflect"|	|
|"those of my employer, and may not even reflect my own"|	|
-----------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads