From owner-freebsd-ports Thu Mar 7 11: 0:43 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 259FB37B417 for ; Thu, 7 Mar 2002 11:00:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g27J02t60161; Thu, 7 Mar 2002 11:00:02 -0800 (PST) (envelope-from gnats) Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by hub.freebsd.org (Postfix) with ESMTP id 3A2A437B42C for ; Thu, 7 Mar 2002 10:51:07 -0800 (PST) Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout0.freenet.de with esmtp (Exim 3.33 #3) id 16j2ym-0007aJ-00 for FreeBSD-gnats-submit@freebsd.org; Thu, 07 Mar 2002 19:51:04 +0100 Received: from a2d79.pppool.de ([213.6.45.121]) by mx2.freenet.de with esmtp (Exim 3.33 #3) id 16j2yl-00058t-00 for FreeBSD-gnats-submit@freebsd.org; Thu, 07 Mar 2002 19:51:04 +0100 Message-Id: <20020307195059.K13350-100000@Symmetry.UUCP> Date: Thu, 7 Mar 2002 19:52:45 +0100 (CET) From: Nils M Holm To: Subject: ports/35638: tn3270 dumps core unconditionally Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35638 >Category: ports >Synopsis: tn3270 dumps core unconditionally >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 07 11:00:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Nils M Holm >Release: FreeBSD 4.4-RELEASE i386 >Organization: >Environment: System: FreeBSD Symmetry.UUCP 4.4-RELEASE FreeBSD 4.4-RELEASE #5: Sun Dec 16 16:52:03 CET 2001 nmh@Symmetry.UUCP:/usr/src/sys/compile/SYMMETRY i386 >Description: When starting tn3270, an infinite loop (by indirect recursion) is entered which finally causes a stack overflow and a core dump. The error is caused because the name of the 'setupterm' function is duplicated in the libcurses library and so setupterm() calls tgetent() and tgetent() calls setupterm(), etc. I have fixed that bug by renaming setupterm() in tn3270/telnet/telnet.c . Yes, the diff is probably not in the format you expect it to be, but it may be better than nothing at all. >How-To-Repeat: Connect to a 3270 host and watch your machine freeze. >Fix: diff -ru work.orig/tn3270/telnet/telnet.c work/tn3270/telnet/telnet.c --- work.orig/tn3270/telnet/telnet.c Mon Aug 30 20:53:48 1999 +++ work/tn3270/telnet/telnet.c Thu Mar 7 19:31:52 2002 @@ -738,7 +738,7 @@ /*ARGSUSED*/ int -setupterm(tname, fd, errp) +_setupterm(tname, fd, errp) char *tname; int fd, *errp; { @@ -772,7 +772,7 @@ if (tnamep && tnamep != unknown) free(tnamep); if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) && - (setupterm(tname, 1, &err) == 0)) { + (_setupterm(tname, 1, &err) == 0)) { tnamep = mklist(termbuf, tname); } else { if (tname && (strlen(tname) <= 40)) { -- Nils M Holm -- http://www.not-compatible.org/nmh/ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message