From owner-freebsd-current@FreeBSD.ORG Wed Aug 16 04:07:05 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 B204316A4DD for ; Wed, 16 Aug 2006 04:07:05 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ADB243D45 for ; Wed, 16 Aug 2006 04:07:04 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by py-out-1112.google.com with SMTP id c59so93904pyc for ; Tue, 15 Aug 2006 21:07:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=FknU9lNUB+5S3CaZtm3rOOEYGni9rTDf0zJSp+c/t+vT+3SXf4wY9cFAUh4FH+Jn0eIrmA1IfDKM4BNhGwm3O7UuHcOBk08bnajccN376ui8MOftPFquTrjf3Kf10QQaKvlCj8UNTbqzetEvSNfKYl4yVIyRgEd57jr9Dp+jtvI= Received: by 10.35.51.13 with SMTP id d13mr475670pyk; Tue, 15 Aug 2006 21:07:04 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.gmail.com with ESMTP id 8sm570231nzn.2006.08.15.21.07.02; Tue, 15 Aug 2006 21:07:04 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id k7G48uB8046205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Aug 2006 13:08:56 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k7G48rIw046204; Wed, 16 Aug 2006 13:08:53 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 16 Aug 2006 13:08:53 +0900 From: Pyun YongHyeon To: takawata@jp.freebsd.org Message-ID: <20060816040853.GA45370@cdnetworks.co.kr> References: <200608151633.k7FGX0Ql025447@ns.init-main.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <200608151633.k7FGX0Ql025447@ns.init-main.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@freebsd.org Subject: Re: AMD64 self build fail during building libmagic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com 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 Aug 2006 04:07:05 -0000 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 16, 2006 at 01:33:00AM +0900, takawata@jp.freebsd.org wrote: > Hi, I recently encountered build failure with libmagic > for this one month. > My investigating shows that intermediate executable 'mkmagic' > fails to detect the termination of some description of entries > which is longer than expect.(According to contrib/file/file.h > the length is MAXDESC=64.) > The following is a workaround for it. Is it known problem? > I also encountered the same issue during upgrade to latest CURRENT on sparc64. mkmagic dumped core on sparc64. I've mananged to track down the cause of failure and I've sent a patch to obrien but got no reply yet. -- Regards, Pyun YongHyeon --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="apprentice.patch" Index: apprentice.c =================================================================== RCS file: /home/ncvs/src/contrib/file/apprentice.c,v retrieving revision 1.1.1.11 diff -u -r1.1.1.11 apprentice.c --- apprentice.c 21 Jun 2006 09:28:00 -0000 1.1.1.11 +++ apprentice.c 16 Aug 2006 04:05:26 -0000 @@ -892,8 +892,10 @@ m->nospflag = 1; } else m->nospflag = 0; - while ((m->desc[i++] = *l++) != '\0' && i < MAXDESC) + while ((m->desc[i++] = *l++) != '\0' && i < MAXDESC - 1) /* NULLBODY */; + /* make sure to terminate the string */ + m->desc[i] = '\0'; if (ms->flags & MAGIC_CHECK) { if (!check_format(ms, m)) --2oS5YaxWCcQjTEyO--