From: etheisen Date: Mon, 12 Feb 1996 07:42:26 +0000 (+0000) Subject: Added check for null pointer while processing cmdline options. Pointer X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=44a0153a90e856f79761468934e9f1c4f4708cde;p=openbsd Added check for null pointer while processing cmdline options. Pointer overrun was causing SEGV if any cmdline options were specified. --- 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 */