Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 2014 15:15:35 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r374594 - in head/games/bsdgames: . files
Message-ID:  <201412121515.sBCFFZ5M009340@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Fri Dec 12 15:15:34 2014
New Revision: 374594
URL: https://svnweb.freebsd.org/changeset/ports/374594
QAT: https://qat.redports.org/buildarchive/r374594/

Log:
  Fix a bounds-checking typo in trek. The number of sectors was being used
  to check input for the quadrant, and NSECTS > NQUADS.
  
  PR:		195837
  Submitted by:	Kenji Rikitake

Added:
  head/games/bsdgames/files/patch-trek_computer.c   (contents, props changed)
Modified:
  head/games/bsdgames/Makefile

Modified: head/games/bsdgames/Makefile
==============================================================================
--- head/games/bsdgames/Makefile	Fri Dec 12 14:30:06 2014	(r374593)
+++ head/games/bsdgames/Makefile	Fri Dec 12 15:15:34 2014	(r374594)
@@ -3,7 +3,7 @@
 
 PORTNAME=	bsdgames
 PORTVERSION=	3.8.2
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	games
 # Fetched from git://git.dragonflybsd.org/dragonfly.git, v${PORTVERSION}, /games

Added: head/games/bsdgames/files/patch-trek_computer.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/bsdgames/files/patch-trek_computer.c	Fri Dec 12 15:15:34 2014	(r374594)
@@ -0,0 +1,15 @@
+--- trek/computer.c.orig	2014-12-12 15:10:37 UTC
++++ trek/computer.c
+@@ -175,10 +175,10 @@ computer(int v __unused)
+ 				tqy = Ship.quady;
+ 			} else {
+ 				ix = getintpar("Quadrant");
+-				if (ix < 0 || ix >= NSECTS)
++				if (ix < 0 || ix >= NQUADS)
+ 					break;
+ 				iy = getintpar("q-y");
+-				if (iy < 0 || iy >= NSECTS)
++				if (iy < 0 || iy >= NQUADS)
+ 					break;
+ 				tqx = ix;
+ 				tqy = iy;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412121515.sBCFFZ5M009340>