From owner-svn-ports-all@freebsd.org Fri May 12 22:35:55 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E833D69B09; Fri, 12 May 2017 22:35:55 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B93AECA4; Fri, 12 May 2017 22:35:54 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CMZr9x074015; Fri, 12 May 2017 22:35:53 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CMZrEA074014; Fri, 12 May 2017 22:35:53 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201705122235.v4CMZrEA074014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 12 May 2017 22:35:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r440737 - in branches/2017Q2/games/acm: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 22:35:55 -0000 Author: jbeich Date: Fri May 12 22:35:53 2017 New Revision: 440737 URL: https://svnweb.freebsd.org/changeset/ports/440737 Log: MFH: r440736 games/acm: prevent free()ing unitialized data acm may coredump immediately after starting on systems which do not zero malloc()ed memory e.g., MALLOC_CONF=junk:true. This is because one of the fields of a malloc()ed data structure (w) contains a pointer (w->csPool2), and if that pointer is never used, then later code will find the pointer is non-NULL and try to free() the memory pointed to by the pointer. PR: 215427 Submitted by: Jeff Gibbons Approved by: ports-secteam blanket Added: branches/2017Q2/games/acm/files/patch-V_lib_InitAWin.c - copied unchanged from r440736, head/games/acm/files/patch-V_lib_InitAWin.c Modified: branches/2017Q2/games/acm/Makefile Directory Properties: branches/2017Q2/ (props changed) Modified: branches/2017Q2/games/acm/Makefile ============================================================================== --- branches/2017Q2/games/acm/Makefile Fri May 12 22:33:54 2017 (r440736) +++ branches/2017Q2/games/acm/Makefile Fri May 12 22:35:53 2017 (r440737) @@ -3,7 +3,7 @@ PORTNAME= acm PORTVERSION= 5.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games MASTER_SITES= http://mirror.amdmi3.ru/distfiles/ Copied: branches/2017Q2/games/acm/files/patch-V_lib_InitAWin.c (from r440736, head/games/acm/files/patch-V_lib_InitAWin.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2017Q2/games/acm/files/patch-V_lib_InitAWin.c Fri May 12 22:35:53 2017 (r440737, copy of r440736, head/games/acm/files/patch-V_lib_InitAWin.c) @@ -0,0 +1,16 @@ +--- V/lib/InitAWin.c.orig 1998-08-14 21:09:02 UTC ++++ V/lib/InitAWin.c +@@ -69,6 +69,13 @@ InitializeX11AWindow(Display * dpy, int screen, Drawab + w->csPool1 = (ColorSegment *) malloc(w->CSSize1 * sizeof(ColorSegment)); + memset(w->csPool1, 0, w->CSSize1 * sizeof(ColorSegment)); + ++ // Initialize csPool2 so program doesn't crash later, ++ // when trying to free it. ++ { ++ w->CSSize2 = 0; ++ w->csPool2 = (ColorSegment *) NULL; ++ } ++ + w->scanLine = (ScanLine *) malloc((w->height + 1) * sizeof(ScanLine)); + w->lastScanLine = (ScanLine *) malloc((w->height + 1) * sizeof(ScanLine)); + w->otherLastScanLine = NULL;