From owner-freebsd-bugs Sat Oct 26 12:50: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2494037B401 for ; Sat, 26 Oct 2002 12:50:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBB0443E77 for ; Sat, 26 Oct 2002 12:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9QJo1x3090938 for ; Sat, 26 Oct 2002 12:50:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9QJo1s8090937; Sat, 26 Oct 2002 12:50:01 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9867B37B404 for ; Sat, 26 Oct 2002 12:42:48 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D6A543E6A for ; Sat, 26 Oct 2002 12:42:48 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9QJgl7R006496 for ; Sat, 26 Oct 2002 12:42:47 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9QJglfM006495; Sat, 26 Oct 2002 12:42:47 -0700 (PDT) Message-Id: <200210261942.g9QJglfM006495@www.freebsd.org> Date: Sat, 26 Oct 2002 12:42:47 -0700 (PDT) From: Kajimoto Masato To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/44504: tcsh-6.12.00's "source" command ignore commands over 4kb with ja_JP.EUC locale Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 44504 >Category: bin >Synopsis: tcsh-6.12.00's "source" command ignore commands over 4kb with ja_JP.EUC locale >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 26 12:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Kajimoto Masato >Release: FreeBSD 4.7 i386 >Organization: individual >Environment: FreeBSD 4.7-RELEASE i386 and maybe all versions using tcsh-6.12.00. >Description: This bug is the same problem discussed in the freebsd-stable ML. http://docs.freebsd.org/cgi/getmsg.cgi?fetch=494343+0+/usr/local/www/db/text/2002/freebsd-stable/20020901.freebsd-stable http://docs.freebsd.org/cgi/getmsg.cgi?fetch=108590+0+/usr/local/www/db/text/2002/freebsd-stable/20020908.freebsd-stable http://docs.freebsd.org/cgi/getmsg.cgi?fetch=162447+0+archive/2002/freebsd-stable/20020908.freebsd-stable In the tcsh's prompt, "source file" command ignore the characters over 4096 bytes if the file has "unset" command before 4096 bytes and /usr/share/nls/$LANG/tcsh.cat file exists. The problem also occurs in ".cshrc". >How-To-Repeat: % env LANG=ja_JP.EUC /bin/tcsh -f % source file For example, the file has "unset a" in the first line, following any commands with over 4096 bytes. Tcsh will ignore all characters over the boundary of 4096 bytes. LANG must be set to the locale with tcsh.cat in /usr/share/nls/$LANG/ before starting tcsh. >Fix: Apply this patch to /usr/src/contrib/tcsh/sh.c diff -c tcsh-6.12.00.ORIG/sh.c tcsh-6.12.00/sh.c *** tcsh-6.12.00.ORIG/sh.c Sat Jul 6 01:28:16 2002 --- tcsh-6.12.00/sh.c Sun Oct 27 01:34:15 2002 *************** *** 1010,1016 **** --- 1010,1026 ---- * descriptor to hold the name of the script (setuid case) and this name * mustn't be lost by closing the fd too soon. */ + #ifdef NLS_BUGS + #ifdef NLS_CATALOGS + (void)catclose(catd); + #endif /* NLS_CATALOGS */ + #endif /* NLS_BUGS */ closem(); + #ifdef NLS_BUGS + #ifdef NLS_CATALOGS + nlsinit(); + #endif /* NLS_CATALOGS */ + #endif /* NLS_BUGS */ /* * Consider input a tty if it really is or we are interactive. but not for >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message