view rogue3/readme36.html @ 176:db1c9a21a7c3

srogue: prevent overflowing the score file name. If SCOREFILE is not defined, roguehome() is called to find a directory for the score file. It copies up to PATH_MAX-20 bytes from an environment variable to a static buffer. Later these are strcpy()'d to scorefile, which is of size LINLEN. Unfortunately LINLEN is 80 and PATH_MAX is at least 256. On Linux, it happens to be 4096. I haven't yet managed to crash or exploit it, but there are surely no beneficial consequences, so roguehome() has been modified to check the length, and the string it returns is also checked in main().
author John "Elwin" Edwards
date Sun, 02 Aug 2015 12:14:47 -0400
parents 38acf3eb27e6
children
line wrap: on
line source

<html>
<head>
<title>ROGUE</title>
</head>
<body>

<h1 align=center>ROGUE 3.6</h1>

<hr>

<h2>NAME</h2>
<blockquote>
	<p>rogue3 &minus; Exploring The Dungeons of Doom</p>
</blockquote>

<h2>SYNOPSIS</h2>
<blockquote>
	<p><b>rogue3</b> [ -s ] [ <i>save_file</i> ] [ -n <i>playername</i> ]</p>
</blockquote>

<h2>DESCRIPTION</h2>
<blockquote>

	<p align="justify"><u>Rogue</u> is a computer fantasy game with a new twist.
	It is crt oriented and the object of the game is to survive the attacks of various 
	monsters and get a lot of gold, rather than the puzzle solving orientation
	of most computer fantasy games.</p>

	<p align="justify">To get started you really only need to know two commands. 
	The command ? will give you a list of the available commands and the command /
	will identify the things you see on the screen.</p>

	<p align="justify">To win the game (as opposed to merely playing to beat 
	other people's high scores) you must locate the Amulet of Yendor which is 
	somewhere below the 20th level of the dungeon and get it out. Nobody has 
	achieved this yet and if somebody does, they will probably go down in history
	as a hero among heros.</p>

	<p align="justify">When the game ends, either by your death, when you quit, 
	or if you (by some miracle) manage to win, <u>rogue</u> will give you a list of the 
	top-ten scorers. The scoring is based entirely upon how much gold you get.
	There is a 10% penalty for getting yourself killed.</p>

	<p align="justify">For more detailed directions, read the document <u>A Guide 
	to the Dungeons of Doom</u>.</p>

</blockquote>

<h2>OPTIONS</h2>
<blockquote>

	<p align="justify">If a <i>save_file</i> argument is given, <u>rogue</u> will attempt 
	to load  a  previously saved game from that file.</p>
	<p align="justify">With  the  <b>-n</b>  option,  <u>rogue</u> will load a game with the 
	name <i>playername</i> from a location defined at compile time.  If no such
	game  exists,  it will start one.</p>
	<p align="justify">The <b>-s</b> option prints the top-ten scores list and exits.</p>
</blockquote>

<h2>FILES</h2>
<blockquote>
	<table border="0" id="table1">
		<tr>
			<td>/usr/local/games/roguelike/rogue3.scr</td>
			<td width="50">&nbsp;</td>
			<td>Score file</td>
		</tr>
		<tr>
			<td>~/rogue3.save</td>
			<td>&nbsp;</td>
			<td>Default save file</td>
		</tr>
		<tr>
			<td>/usr/local/games/roguelike/rogue3save</td>
			<td>&nbsp;</td>
			<td>System savefiles</td>
		</tr>
	</table>
</blockquote>

<h2>SEE ALSO</h2>
<p>Michael C. Toy, <u>A Guide to the Dungeons of Doom</u></p>

<h2>BUGS</h2>
<p>Probably infinite. Currently known bugs are: Sometimes you are still
hungry even after you eat food and sometimes you get a monster on the
screen in reverse video which may or may not cause a core dump.</p>

<h2>COPYRIGHT</h2>
Rogue: Exploring the Dungeons of Doom<br>
Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman <br>
All rights reserved.<br>
License: 3-clause BSD, see LICENSE.txt for details.

</body>
</html>