Created attachment 150416 [details] patch for computer.c computer.c in bsdgames trek has a bug. Patch attached to fix this. Note: this is the upstream (Dragonfly) bug (not reported yet to Dragonfly). See also https://github.com/jj1bdx/bsdtrek/commit/da9b15595e3bf52d6c5326f9d56dc3ad96d5e5fb
Auto-assigned to maintainer adamw@FreeBSD.org
What is the bug?
(In reply to Adam Weinberger from comment #2) > What is the bug? Without the change the program will accept out-of-range quadrant numbers. In trek.h, the values of the macros are defined as NQUADS = 8 and NSECTS = 10.
A commit references this bug: Author: adamw Date: Fri Dec 12 15:15:35 UTC 2014 New revision: 374594 URL: https://svnweb.freebsd.org/changeset/ports/374594 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 Changes: head/games/bsdgames/Makefile head/games/bsdgames/files/patch-trek_computer.c
Committed. Thanks for your all work here, Kenji!