summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authoretheisen <etheisen@cvs.openbsd.org>1996-02-12 07:42:27 +0000
committeretheisen <etheisen@cvs.openbsd.org>1996-02-12 07:42:27 +0000
commit5983f89de9c87963b279f99bf6d5b4663a016e13 (patch)
tree0448ad491f04d1f939aae257f07f91856b676f88 /games
parent228be9f3e4c1b20930547002be7e3b28a016a247 (diff)
Added check for null pointer while processing cmdline options. Pointer
overrun was causing SEGV if any cmdline options were specified.
Diffstat (limited to 'games')
-rw-r--r--games/backgammon/common_source/subs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/games/backgammon/common_source/subs.c b/games/backgammon/common_source/subs.c
index 9fb185fe5a3..ab38c956d0a 100644
--- a/games/backgammon/common_source/subs.c
+++ b/games/backgammon/common_source/subs.c
@@ -314,7 +314,7 @@ register char ***arg;
if the game is being recovered */
s = *arg;
- while (s[0][0] == '-') {
+ while ((s[0] != NULL) && (s[0][0] == '-')) {
switch (s[0][1]) {
/* don't ask if rules or instructions needed */