X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:from:to:cc:subject:date
	:mime-version:content-type:content-transfer-encoding; q=dns; s=
	default; b=I5CBql65p5bbE/8364HUKBZoKgQ0rZmckpGLnXJCMw4s+hINPSDai
	FndV9B39FADIhwr8dqlx/lJhJnJj69rrvvqLwY0ElbFxtM1zHdLTpsCvvGjzRJul
	f5tgs6gT0D9QFDGmLgQ2X7+jSNdUo7kmeiD9G3KnYQ9AYJD1aJYepY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:from:to:cc:subject:date
	:mime-version:content-type:content-transfer-encoding; s=default;
	 bh=bdym6I20j20b+UzOUQi4n2PgHRE=; b=uPhx/pZuYytFW9U1RLxuXfq5bsdV
	9Loqfb88UVhL86ZT9C20pfx/0hjgSE/Q8cZfCupvBSIMQHuaudZr2OQ2VZcYXoCf
	FUBROuDcf+9+b32PnVQNA7fbeeKdlJtRVHRA0N4Ut6r7m6rgrup9P9UNEpyoOueY
	APmWZsm7wrjhpzE=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: BAY004-OMC2S27.hotmail.com
X-TMN: [IITO+Rj0v+dBvg0oSoLkjvm9E6w0qfY5]
Message-ID: <BAY169-DS4C6B8EA9E64E844F67D9BA7210@phx.gbl>
From: "Tony Kelman" <tony@kelman.net>
To: <cygwin@cygwin.com>
Cc: <mintty-discuss@groups.l.google.com>
Subject: mintty needs a patch
Date: Sat, 14 Feb 2015 23:10:07 -0800
MIME-Version: 1.0
Content-Type: text/plain;	format=flowed;	charset="UTF-8";	reply-type=original
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

I was trying to build mintty from its src package today. As a heads-up
for whoever next tries to build the package, I get the following error
on either 32 or 64 bit:

gcc -c -MMD -MP -DTARGET=x86_64-pc-cygwin -DNDEBUG -std=gnu99 -include 
std.h -Wall -Wextra -Wundef -Werror -mtune=atom -fomit-frame-pointer -O2 
wintext.c
windres --preprocessor 
'gcc -E -xc -DRC_INVOKED -MMD -MP -DTARGET=x86_64-pc-cygwin -DNDEBUG' res.rc 
res.o
wintext.c: In function ‘win_text’:
wintext.c:522:13: error: array subscript is above array bounds 
[-Werror=array-bounds]
   if (!fonts[nfont]) {
             ^
cc1: all warnings being treated as errors
Makefile:117: recipe for target 'wintext.o' failed
make: *** [wintext.o] Error 1


This can at least be made into a warning by taking off -Werror, but it looks
like it might be a real off-by-one. Our neighbors over at MSYS2 have a patch
https://github.com/Alexpux/MSYS2-packages/blob/master/mintty/01-array-bounds.patch
(the packaging repo there has a BSD 3-clause license) to change FONT_MAXNO
in wintext.c from 0x1F to 0x20.

-Tony


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

