🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by John Stewart Fri, 09 Dec 1983 20:04
fix to termcap.c and remcap.c
#153
Author: John Stewart
Date: Fri, 09 Dec 1983 20:04
35 lines
1509 bytes
This is a repeat of a fix I reported about a year ago, but which
apparently did not make it to "official" versions.
It appears in .../tip/remcap.c (4.6	81/11/29), which is hacked from
.../libtermlib/termcap.c (unnumbered and undated).

The problem is that if the string `tcname' is not terminated with a
colon, the indicated while loop will clobber one somewhere else in
your stack.

Note in passing, that the problem is rarely seen if keepers of
/etc/remote and /etc/termcap are relatively fastidious in adhering
to the proper format.

	John Stewart, Teledyne Geotech

*** remcap.c	Fri Dec  9 14:28:23 1983
--- remcap.c.bad	Thu Jul 28 11:12:08 1983
***************
*** 168,174
  		return(1);
  	strcpy(tcname,p+3);
  	q = tcname;
! 	while (*q && *q != ':')
  		q++;
  	*q = 0;
  	if (++hopcount > MAXHOP) {

--- 168,174 -----
  		return(1);
  	strcpy(tcname,p+3);
  	q = tcname;
! 	while (q && *q != ':')
  		q++;
  	*q = 0;
  	if (++hopcount > MAXHOP) {
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