artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab6d7bb
)
Added check for null pointer while processing cmdline options. Pointer
author
etheisen
<etheisen@openbsd.org>
Mon, 12 Feb 1996 07:42:26 +0000
(07:42 +0000)
committer
etheisen
<etheisen@openbsd.org>
Mon, 12 Feb 1996 07:42:26 +0000
(07:42 +0000)
overrun was causing SEGV if any cmdline options were specified.
games/backgammon/common_source/subs.c
patch
|
blob
|
history
diff --git
a/games/backgammon/common_source/subs.c
b/games/backgammon/common_source/subs.c
index
9fb185f
..
ab38c95
100644
(file)
--- 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 */