From 44a0153a90e856f79761468934e9f1c4f4708cde Mon Sep 17 00:00:00 2001 From: etheisen Date: Mon, 12 Feb 1996 07:42:26 +0000 Subject: [PATCH] Added check for null pointer while processing cmdline options. Pointer overrun was causing SEGV if any cmdline options were specified. --- games/backgammon/common_source/subs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.20.1