NetBSD Problem Report #47884

From www@NetBSD.org  Mon Jun  3 22:31:16 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9C8D471942
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  3 Jun 2013 22:31:16 +0000 (UTC)
Message-Id: <20130603223115.6B2CC71AA3@mollari.NetBSD.org>
Date: Mon,  3 Jun 2013 22:31:15 +0000 (UTC)
From: brad.harder@gmail.com
Reply-To: brad.harder@gmail.com
To: gnats-bugs@NetBSD.org
Subject: X11 failing to build in -current (amd64)
X-Send-Pr-Version: www-1.0

>Number:         47884
>Category:       xsrc
>Synopsis:       X11 failing to build in -current (amd64)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 03 22:35:00 +0000 2013
>Closed-Date:    Tue Jun 04 01:10:44 +0000 2013
>Last-Modified:  Tue Jun 04 01:10:44 +0000 2013
>Originator:     Brad Harder
>Release:        -current
>Organization:
method logic digital
>Environment:
NetBSD kamloops 6.99.21 NetBSD 6.99.21 (GENERIC) #184: Fri May 31 12:04:33 PDT 2013  root@kamloops:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
/usr/xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c: In function 'iga2_crtc_gamma_set':
/usr/xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c:1409:1: error: not protecting local variables: variable length buffer
/usr/xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c: In function 'iga1_crtc_gamma_set':
/usr/xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c:998:1: error: not protecting local variables: variable length buffer
>How-To-Repeat:
cvs to latest src, xsrc, 

cd /usr/src
./build.sh -j4 -u -x distribution
>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47884 CVS commit: xsrc/external/mit/xf86-video-openchrome/dist/src
Date: Mon, 3 Jun 2013 18:44:40 -0400

 Module Name:	xsrc
 Committed By:	christos
 Date:		Mon Jun  3 22:44:40 UTC 2013

 Modified Files:
 	xsrc/external/mit/xf86-video-openchrome/dist/src: via_display.c

 Log Message:
 PR/47884: Brad Harder: Avoid variable stack allocation, use malloc for SSP.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.2 -r1.2 \
     xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: B Harder <brad.harder@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: PR/47884 CVS commit: xsrc/external/mit/xf86-video-openchrome/dist/src
Date: Mon, 3 Jun 2013 16:31:37 -0700

 Excellent. The fix was so fast, I hadn't even finished swallowing the
 mouthful of Cheerios from the time I submitted the report.

 I ran into the same issue w/ another file, and following your lead,
 humbly propose the following additional patch to xsrc:

 Index: external/mit/xf86-video-openchrome/dist/src/via_lvds.c
 ===================================================================
 RCS file: /cvsroot/xsrc/external/mit/xf86-video-openchrome/dist/src/via_lvds.c,v
 retrieving revision 1.1.1.2
 diff -r1.1.1.2 via_lvds.c
 1473c1473
 <     char aux[strlen(name) + 1];
 ---
 >     char *aux;
 1475a1476,1479
 >     aux=malloc(strlen(name)+1);
 >     if(aux == NULL)
 >       return;
 >
 1491a1496
 >    free(aux);

 On 6/3/13, Christos Zoulas <christos@netbsd.org> wrote:
 > The following reply was made to PR xsrc/47884; it has been noted by GNATS.
 >
 > From: "Christos Zoulas" <christos@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc:
 > Subject: PR/47884 CVS commit:
 > xsrc/external/mit/xf86-video-openchrome/dist/src
 > Date: Mon, 3 Jun 2013 18:44:40 -0400
 >
 >  Module Name:	xsrc
 >  Committed By:	christos
 >  Date:		Mon Jun  3 22:44:40 UTC 2013
 >
 >  Modified Files:
 >  	xsrc/external/mit/xf86-video-openchrome/dist/src: via_display.c
 >
 >  Log Message:
 >  PR/47884: Brad Harder: Avoid variable stack allocation, use malloc for
 > SSP.
 >
 >
 >  To generate a diff of this commit:
 >  cvs rdiff -u -r1.1.1.2 -r1.2 \
 >      xsrc/external/mit/xf86-video-openchrome/dist/src/via_display.c
 >
 >  Please note that diffs are not public domain; they are subject to the
 >  copyright notices on the relevant files.
 >
 >


 -- 
 Brad Harder
 Method Logic Digital Consulting
 http://www.methodlogic.net/
 http://twitter.com/bcharder

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, xsrc-manager@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org, brad.harder@gmail.com
Cc: 
Subject: Re: PR/47884 CVS commit: xsrc/external/mit/xf86-video-openchrome/dist/src
Date: Mon, 3 Jun 2013 20:20:00 -0400

 On Jun 3, 11:35pm, brad.harder@gmail.com (B Harder) wrote:
 -- Subject: Re: PR/47884 CVS commit: xsrc/external/mit/xf86-video-openchrome/

 |  I ran into the same issue w/ another file, and following your lead,
 |  humbly propose the following additional patch to xsrc:

 This was a bit different, because aux is being overwritten by sprintf().

 christos

From: B Harder <brad.harder@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: PR/47884 CVS commit: xsrc/external/mit/xf86-video-openchrome/dist/src
Date: Mon, 3 Jun 2013 17:57:00 -0700

 ah -- I should have taken a closer look; anyway, thanks for the prompt fixes.

 On 6/3/13, Christos Zoulas <christos@zoulas.com> wrote:
 > The following reply was made to PR xsrc/47884; it has been noted by GNATS.
 >
 > From: christos@zoulas.com (Christos Zoulas)
 > To: gnats-bugs@NetBSD.org, xsrc-manager@netbsd.org, gnats-admin@netbsd.org,
 >
 > 	netbsd-bugs@netbsd.org, brad.harder@gmail.com
 > Cc:
 > Subject: Re: PR/47884 CVS commit:
 > xsrc/external/mit/xf86-video-openchrome/dist/src
 > Date: Mon, 3 Jun 2013 20:20:00 -0400
 >
 >  On Jun 3, 11:35pm, brad.harder@gmail.com (B Harder) wrote:
 >  -- Subject: Re: PR/47884 CVS commit:
 > xsrc/external/mit/xf86-video-openchrome/
 >
 >  |  I ran into the same issue w/ another file, and following your lead,
 >  |  humbly propose the following additional patch to xsrc:
 >
 >  This was a bit different, because aux is being overwritten by sprintf().
 >
 >  christos
 >
 >


 -- 
 Brad Harder
 Method Logic Digital Consulting
 http://www.methodlogic.net/
 http://twitter.com/bcharder

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 04 Jun 2013 01:10:44 +0000
State-Changed-Why:
fixed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.