diff options
author | adamw <adamw@FreeBSD.org> | 2014-12-12 23:15:34 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2014-12-12 23:15:34 +0800 |
commit | 06d4c150923bb7bc6ccc69c492bf5d2fa33a67e5 (patch) | |
tree | 4ae55d9b872866be3db7a7c7ddf393713329a5dc /games | |
parent | 58a25ab3b7c3bc7da15e22d253aef9715d476659 (diff) | |
download | freebsd-ports-gnome-06d4c150923bb7bc6ccc69c492bf5d2fa33a67e5.tar.gz freebsd-ports-gnome-06d4c150923bb7bc6ccc69c492bf5d2fa33a67e5.tar.zst freebsd-ports-gnome-06d4c150923bb7bc6ccc69c492bf5d2fa33a67e5.zip |
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
Diffstat (limited to 'games')
-rw-r--r-- | games/bsdgames/Makefile | 2 | ||||
-rw-r--r-- | games/bsdgames/files/patch-trek_computer.c | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/games/bsdgames/Makefile b/games/bsdgames/Makefile index 29a7080c3c3e..2ec7ba2b5672 100644 --- a/games/bsdgames/Makefile +++ b/games/bsdgames/Makefile @@ -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 diff --git a/games/bsdgames/files/patch-trek_computer.c b/games/bsdgames/files/patch-trek_computer.c new file mode 100644 index 000000000000..58a062a4d35d --- /dev/null +++ b/games/bsdgames/files/patch-trek_computer.c @@ -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; |