From owner-freebsd-current Fri Jul 28 6:20:27 2000 Delivered-To: freebsd-current@freebsd.org Received: from knight.cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (Postfix) with ESMTP id 373D937C1D5; Fri, 28 Jul 2000 06:20:22 -0700 (PDT) (envelope-from cracauer@knight.cons.org) Received: (from cracauer@localhost) by knight.cons.org (8.9.3/8.9.3) id PAA14506; Fri, 28 Jul 2000 15:20:20 +0200 (CEST) Date: Fri, 28 Jul 2000 15:20:19 +0200 From: Martin Cracauer To: "Andrey A. Chernov" Cc: Martin Cracauer , Hajimu UMEMOTO , kuriyama@FreeBSD.ORG, cracauer@FreeBSD.ORG, FreeBSD-current@FreeBSD.ORG Subject: Re: /bin/sh dumps core with here-document of 8bit text Message-ID: <20000728152019.A14471@cons.org> References: <7mr98fq7b4.wl@waterblue.imgsrc.co.jp> <20000728.150627.74708840.ume@mahoroba.org> <20000728094707.A10655@cons.org> <20000728061533.A49657@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000728061533.A49657@freebsd.org>; from ache@FreeBSD.ORG on Fri, Jul 28, 2000 at 06:15:33AM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In <20000728061533.A49657@freebsd.org>, Andrey A. Chernov wrote: > On Fri, Jul 28, 2000 at 09:47:08AM +0200, Martin Cracauer wrote: > > ! if (c >= CTLESC && c <= CTLQUOTEMARK) { > > synentry = CWORD; > > ! fprintf(stderr, > > ! "Warning: internal control character in " > > ! "literal text, using '?' instead\n"); > > ! c = '?'; > > ! } > > > I disagree. It is not the fix, just admitting the bug. Better try to fix it via > some escaping of control characters via some prefix char. Bash is 8bit clean > in that place, f.e. Please refer to my previous mail. I think it's better to extend the internal character handling to int* instead of obfuscating it even more with escape sequences (remember that they are processed multiple times and such things as taking the length of something, see related PR fix recently). Until that is done, we should commit this diff, because it *fixes* the breakage of coredumping and eating all input (not only th offending chars), even when it does not solve the problem of not being 8-bit clean. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ BSD User Group Hamburg, Germany http://www.bsdhh.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message