From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 18 21:50:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ED181065675 for ; Wed, 18 Feb 2009 21:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E0EDE8FC1B for ; Wed, 18 Feb 2009 21:50:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1ILo0dJ009877 for ; Wed, 18 Feb 2009 21:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1ILo0x4009876; Wed, 18 Feb 2009 21:50:00 GMT (envelope-from gnats) Resent-Date: Wed, 18 Feb 2009 21:50:00 GMT Resent-Message-Id: <200902182150.n1ILo0x4009876@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Szalai Andras Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAC971065675 for ; Wed, 18 Feb 2009 21:41:15 +0000 (UTC) (envelope-from szalai.bandi@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1A78FC16 for ; Wed, 18 Feb 2009 21:41:14 +0000 (UTC) (envelope-from szalai.bandi@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so827021fgb.35 for ; Wed, 18 Feb 2009 13:41:14 -0800 (PST) Received: by 10.86.94.11 with SMTP id r11mr3032003fgb.11.1234991923859; Wed, 18 Feb 2009 13:18:43 -0800 (PST) Received: from tristania.mooo.com (94-21-15-87.pool.digikabel.hu [94.21.15.87]) by mx.google.com with ESMTPS id 4sm242929fge.54.2009.02.18.13.18.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 18 Feb 2009 13:18:43 -0800 (PST) Received: by tristania.kispest.home (Postfix, from userid 1000) id 55865D4C69; Wed, 18 Feb 2009 22:14:43 +0100 (CET) Message-Id: <20090218211443.GA6476@tristania.kispest.home> Date: Wed, 18 Feb 2009 22:14:43 +0100 From: Szalai Andras To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/131857: [patch] devel/libslang2 line drawing characters bug X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Szalai Andras List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 21:50:02 -0000 >Number: 131857 >Category: ports >Synopsis: [patch] devel/libslang2 line drawing characters bug >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 18 21:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Szalai Andras >Release: FreeBSD 7.1-RELEASE-p1 i386 >Organization: none >Environment: System: FreeBSD tristania.kispest.home 7.1-RELEASE-p1 FreeBSD 7.1-RELEASE-p1 #0: Sun Jan 11 17:34:03 CET 2009 root@tristania.kispest.home:/disk/ad8p5/root.usr/src/sys/i386/compile/TRISTANIA i386 Relevant package versions: mc-4.6.2 libslang2-2.1.4 >Description: If you execute an application (e.g. mc), which uses devel/libslang2 to do screen I/O on a non-unicode terminal then the line drawing characters will appear as spaces. >How-To-Repeat: $ export LANG=en_US.ISO8859-1 $ mc >Fix: I have tracked the problem down to a bug in the slang2 library. In the file src/sldisply.c there is a function named tt_tgetstr which reads out capability strings from termcap. This function calls ncurses' tgetstr which does the real work, however the buffer for the capability string is a local variable (which will be filled by tgetstr). But in case of the "ac" capability, tt_tgetstr returns with the address of this buffer, and therefore it will point to an invalid address. The attached patch solves this isssue. --- src.diff begins here --- diff -ru orig/src/sldisply.c new/src/sldisply.c --- orig/src/sldisply.c 2008-08-25 02:20:40.000000000 +0200 +++ new/src/sldisply.c 2009-02-15 16:58:30.000000000 +0100 @@ -2229,14 +2229,6 @@ s = _pSLtt_tigetstr (Terminfo, cap); #endif - /* Do not strip pad info for alternate character set. I need to make - * this more general. - */ - /* FIXME: Priority=low; */ - if (0 == strcmp (cap, "ac")) - return s; - - s = fixup_tgetstr (s); #ifdef USE_TERMCAP if ((s >= area_buf) && (s < area_buf + sizeof(area_buf))) { @@ -2249,6 +2241,15 @@ s = SLmake_string (s); } #endif + + /* Do not strip pad info for alternate character set. I need to make + * this more general. + */ + /* FIXME: Priority=low; */ + if (0 == strcmp (cap, "ac")) + return s; + + s = fixup_tgetstr (s); return s; } --- src.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: