diff options
author | etheisen <etheisen@cvs.openbsd.org> | 1996-02-12 07:42:27 +0000 |
---|---|---|
committer | etheisen <etheisen@cvs.openbsd.org> | 1996-02-12 07:42:27 +0000 |
commit | 5983f89de9c87963b279f99bf6d5b4663a016e13 (patch) | |
tree | 0448ad491f04d1f939aae257f07f91856b676f88 /games | |
parent | 228be9f3e4c1b20930547002be7e3b28a016a247 (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.c | 2 |
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 */ |