From owner-freebsd-current Fri Jul 28 6:24:48 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 B9D6837C287; Fri, 28 Jul 2000 06:24:42 -0700 (PDT) (envelope-from cracauer@knight.cons.org) Received: (from cracauer@localhost) by knight.cons.org (8.9.3/8.9.3) id PAA14592; Fri, 28 Jul 2000 15:24:41 +0200 (CEST) Date: Fri, 28 Jul 2000 15:24:41 +0200 From: Martin Cracauer To: "Andrey A. Chernov" Cc: Martin Cracauer , Jun Kuriyama , cracauer@FreeBSD.ORG, Current Subject: Re: /bin/sh dumps core with here-document of 8bit text Message-ID: <20000728152440.A14570@cons.org> References: <7mr98fq7b4.wl@waterblue.imgsrc.co.jp> <20000728090349.A9976@cons.org> <20000728062133.B49657@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000728062133.B49657@freebsd.org>; from ache@FreeBSD.ORG on Fri, Jul 28, 2000 at 06:21:33AM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In <20000728062133.B49657@freebsd.org>, Andrey A. Chernov wrote: > On Fri, Jul 28, 2000 at 09:03:49AM +0200, Martin Cracauer wrote: > > 1) It seems that you can work around the coredump by looking at the > > next char after \202. For real expansions of variables in > > here-documents that is \201. Once can probably determine all > > possible legal combinations and ignore others. However, that > > The problem is that all combinations are legal, there can be binary data passed. > It means that all control chars must be double-escaped first just after data > reading. Exactly. When I'm going to fix it, I will use the other solution (char* -> int* for internal parsed buffers). 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