From owner-freebsd-current@FreeBSD.ORG Wed Jul 16 00:43:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 366E937B401; Wed, 16 Jul 2003 00:43:39 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29ABE43F93; Wed, 16 Jul 2003 00:43:38 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h6G7hbv1002797; Wed, 16 Jul 2003 00:43:37 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h6G7hbNd018115; Wed, 16 Jul 2003 00:43:37 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h6G7hbu6018114; Wed, 16 Jul 2003 00:43:37 -0700 (PDT) (envelope-from marcel) Date: Wed, 16 Jul 2003 00:43:37 -0700 From: Marcel Moolenaar To: Kris Kennaway Message-ID: <20030716074337.GA17997@dhcp01.pn.xcllnt.net> References: <200307141153.h6EBrJKk045346@cueball.rtp.FreeBSD.org> <20030715175821.K34004@beagle.fokus.fraunhofer.de> <20030715185438.GB15674@dhcp01.pn.xcllnt.net> <20030715190456.GC15674@dhcp01.pn.xcllnt.net> <20030715193518.GA1660@crow.dom2ip.de> <20030716010908.GA24218@rot13.obsecurity.org> <20030716051103.GB17596@dhcp01.pn.xcllnt.net> <20030716051601.GA25527@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <20030716051601.GA25527@rot13.obsecurity.org> User-Agent: Mutt/1.5.4i cc: anholt@FreeBSD.org cc: current@FreeBSD.org Subject: Fix for rman [was: Re: [-CURRENT tinderbox] ...] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2003 07:43:39 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 15, 2003 at 10:16:01PM -0700, Kris Kennaway wrote: > > > > malloc, you say? I have build failures in XFree4-clients because > > rman coredumps and I have a backtrace full of free() frames... > > > > Coincidence? > > Some of the XFree86 utilities contain malloc bugs..rman in particular > has been dumping core on certain ports for a couple of years. I tried > to track it down once but couldn't find it. [cc anholt@] The attached patch fixes rman. The faulting case is "\\\0". The '\0' was handled in the default case for escaped characters, which also incremented the pointer p beyond the terminating '\0'. Oh: this goes to devel/imake-4 of course. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-rman.c" --- ../extras/rman/rman.c.orig Tue Jul 15 23:53:53 2003 +++ ../extras/rman/rman.c Tue Jul 15 23:44:21 2003 @@ -4104,6 +4104,9 @@ } } break; + case 0: + /* ignore */ + break; default: /* unknown escaped character */ sputchar(*p++); } --BOKacYhQ+x31HxR3--