Commit Graph

8954 Commits

Author SHA1 Message Date
nhmall
a6c46bbd85 housekeeping items for 3.6.5 - first pass 2020-01-14 11:35:06 -05:00
PatR
cdc598e8bd fix pline.c potential buffer overruns
Fix 'Bugs 4, 5, and 6' which all use a similar fix but would have
conflicts over '#define BIGBUFSZ' if committed separately.

Format ("short explanation %s", string_argument), where the
explanation always has modest length but the string is potentially
up to 4*BUFSZ in length, into a 5*BUFSZ buffer.  Then truncate the
result to at most BUFSZ-1 characters so that it can be safely passed
to interface-specific putstr() or raw_print().

Applies to pline(), raw_printf(), and config_error_add().  Also done
for impossible() although there's no evidence that its buffer could
be overflowed in a controlled manner.
2020-01-14 02:52:34 -08:00
PatR
74de7d31e0 fix sym_val() buffer overrun
Fix 'Bug 3' where too long SYMBOL=string in run-time config file could
overflow a local buffer and clobber the stack.

Valid value is only one character long after processing an 'escaped'
encoded character which can be at most 6 characters (plus terminator):
backslash M backslash and up three digits.  If/when UTF8 gets added
the number of digits will increase.  Use a truncated copy of the input
(substantially bigger than 6+1); ignore any excess.
2020-01-14 02:05:14 -08:00
PatR
a842fda44c fix add_menu_coloring() buffer overrun
Fix 'Bug 2' where too long MENUCOLOR=string in run-time config file
could overflow a local buffer and clobber the stack.

Theoretically a menu coloring regular expression could require a
bigger buffer but I don't think we need to try to support that.
255 characters minus the amount needed to specify color and/or
attributes should be ample.
2020-01-13 19:26:53 -08:00
PatR
c35139e9ce fixes36.5 2020-01-13 19:17:35 -08:00
PatR
6d5c32f38a groundwork
Fix one warning and reformat some of the recently added code.
2020-01-13 19:09:57 -08:00
nhmall
25c9fb8d2f fixes update 2020-01-13 15:30:23 -05:00
nhmall
d6183d065e windows intermediate file into .gitignore 2020-01-13 15:23:42 -05:00
nhmall
6397f0d895 remove unintended src file 2020-01-13 15:03:03 -05:00
nhmall
5b0f3ae7bf fix bug1
have string_for_opt() return the value string or empty_optstr to
provide some level of crash protection if some future added option
processing misbehaves. Callers of string_for_opt() and
string_for_env_opt() should always check for a match to empty_optstr.
2020-01-13 14:54:48 -05:00
nhmall
bb715bc824 ignore lib folder 2020-01-13 11:25:38 -05:00
Bart House
be47c0303d Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-12-21 17:04:49 -08:00
nhmall
08dd9acf92 post-release windows binary fix 2019-12-21 20:02:37 -05:00
Bart House
37a7d624be Ensure front tile size is non-zero to avoid divide by zero exceptions. 2019-12-21 13:14:14 -08:00
Bart House
fb044c1a9f Bump in manifest to reflect latest store release. 2019-12-21 13:13:43 -08:00
nhw_cron
7db034321d This is cron-daily v1-Dec-12-2019. files updated: Files 2019-12-19 17:21:18 -05:00
nhmall
27b4df6b18 .travis.yml update post-3.6.4 2019-12-18 17:23:17 -05:00
nhmall
843bb5cfc9 landing spot for post-3.6.4 patches if needed
This is a landing spot.
2019-12-18 16:49:55 -05:00
nhmall
cbfa58fe25 post-release 2019-12-18 16:46:30 -05:00
nhmall
cf9e92677a update version 2019-12-18 15:29:40 -05:00
nhmall
8cbed3877d README bit 2019-12-18 10:01:54 -05:00
nhw_cron
7348621e41 This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-18 07:15:54 -05:00
nhmall
96155c7e02 housekeeping updates 2019-12-17 23:38:06 -05:00
nhmall
9815cceae6 Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-12-17 23:18:06 -05:00
nhmall
5f0d06fb80 update and simplify the windows portable_device_paths sysconf option
Requires a sysconf file in the windows executable directory in order to work
2019-12-17 23:16:44 -05:00
PatR
8349d95992 ceiling hiders vs '>'
Poly'd hero hiding on the ceiling was told "you can't go down here"
if using '>' at a spot that didn't have down stairs, trap door, hole,
or pit.  Let '>' bring a ceiling hider out of hiding; lurker above
resumes flying, piercer falls to floor or whatever is underneath it.
2019-12-17 19:08:26 -08:00
PatR
512f886ca6 wizard mode wishing for terrain
Fix some issues noticed when experimenting with ceiling hiders.
They're all blind (at least without the monks' Eyes) and some of
the behavior while blind seemed to be incorrect (though some that
I thought was wrong turned out to be ok; feel_newsym() won't update
the map if the hero can't reach the floor).  Fixing that made me
notice that some terrain side-effects (being underwater or stuck in
lava) weren't getting disabled when the underlying terrain wasn't
the corresponding type anymore.
2019-12-17 18:14:08 -08:00
PatR
0ee445ce0b ceiling_hider()
Just groundwork so far; no change in game play.
2019-12-17 15:48:37 -08:00
PatR
f001de7954 parse_conf_file fix fix 2019-12-17 15:41:58 -08:00
nhmall
089b241010 Windows portable_device support: skip the "illegal folder" check for now 2019-12-17 15:32:10 -05:00
nhw_cron
71b7d6299c This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-17 14:53:51 -05:00
nhw_cron
fccdd2bb54 This is cron-daily v1-Dec-12-2019. files updated: Files 2019-12-17 14:53:18 -05:00
nhmall
853a4608f0 Merge branch 'housekeeping-to-merge-at-3.6.4-release' into NetHack-3.6 2019-12-17 14:19:20 -05:00
nhmall
aa37d499c5 Merge branch 'config-overflow-fix' of https://rodney.nethack.org:20040/git/NHsource into config-overflow-fix 2019-12-17 14:18:44 -05:00
PatR
f4a840a48f fix potential buffer overflow loading config file 2019-12-17 14:17:55 -05:00
nhmall
00869d4357 Merge branch 'housekeeping-to-merge-at-3.6.4-release' of https://rodney.nethack.org:20040/git/NHsource into housekeeping-to-merge-at-3.6.4-release 2019-12-17 14:13:16 -05:00
nhmall
74a5339a5e housekeeping updates for 3.6.4
typos

README update
2019-12-17 14:11:52 -05:00
nhmall
2b0040975b README update 2019-12-17 14:00:28 -05:00
nhmall
58241fdaf3 put original 3.7 fixes entry into 3.6 fixes file 2019-12-17 12:17:46 -05:00
nhmall
2cff164c42 clinger messaging 2019-12-17 11:47:25 -05:00
nhmall
90e4ffc0a0 flying hero should be able to pass through a hole using '>' 2019-12-17 11:32:25 -05:00
nhmall
05df5dfbf2 buffer bit 2019-12-17 01:17:49 -05:00
nhmall
51b02a7584 correct revision of one file on the commit 2019-12-17 01:07:53 -05:00
nhmall
ac6e13fd7a allow run-from-removable-device configuration on Windows
Allow a way to configure NetHack to run entirely from a USB stick
or other removable device in a way that allows everything to
reside entirely on the USB stick, and nothing on the computer's
hard drive. That could be done in versions prior to 3.6.3.

Sample:

i: is a USB stick

i:\nhdist contains the NetHack Windows distribution and a sysconf
file dropped into that distribution with the following entry in it:
	portable_device_top = nethack

No device is included in the portable_device_top entry, the device
is always the device that the nethack exe resides on. If you try
to specify a device in the portable_device_top path, the device
portion will be ignored.

portable_device_top specifies the folder on the device that is writable
by NetHack and as such it cannot be the same folder that the executable
resides in.

i:\nhdist\nethack --showpaths
Variable playground locations:
    [hackdir   ]="i:\nethack\"
    [leveldir  ]="i:\nethack\"
    [savedir   ]="i:\nethack\"
    [bonesdir  ]="i:\nethack\"
    [datadir   ]="i:\nhdist\"
    [scoredir  ]="i:\nethack\"
    [lockdir   ]="i:\nethack\"
    [sysconfdir]="i:\nhdist\"
    [configdir ]="i:\nethack\"
    [troubledir]="i:\nethack\"
NetHack's system configuration file (in sysconfdir):
    "i:\nhdist\sysconf"
The loadable symbols file (in sysconfdir):
    "i:\nhdist\symbols"
Basic data files (in datadir) are collected inside:
    "i:\nhdist\nhdat363"
No end-of-game disclosure file (disabled).
Writable folder for portable device config (sysconf portable_device_top):
    "i:\nethack\"
Your personal configuration file (in configdir):
    "i:\nethack\.nethackrc"

Without that sysconf file in the NetHack distribution folder on the
USB stick with the 'portable_device_top = '  entry, the paths
return to the default locations for 3.6.3 on Windows:

i:\nhdist\nethack --showpaths
Variable playground locations:
    [hackdir   ]="C:\Users\JaneDoe\NetHack\3.6\"
    [leveldir  ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\"
    [savedir   ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\"
    [bonesdir  ]="C:\ProgramData\NetHack\3.6\"
    [datadir   ]="i:\nhdist\"
    [scoredir  ]="C:\ProgramData\NetHack\3.6\"
    [lockdir   ]="C:\ProgramData\NetHack\3.6\"
    [sysconfdir]="C:\ProgramData\NetHack\3.6\"
    [configdir ]="C:\Users\JaneDoe\NetHack\"
    [troubledir]="C:\Users\JaneDoe\NetHack\3.6\"
NetHack's system configuration file (in sysconfdir):
    "C:\ProgramData\NetHack\3.6\sysconf"
The loadable symbols file (in sysconfdir):
    "C:\ProgramData\NetHack\3.6\symbols"
Basic data files (in datadir) are collected inside:
    "i:\nhdist\nhdat363"
No end-of-game disclosure file (disabled).
Your personal configuration file (in configdir):
    "C:\Users\JaneDoe\NetHack\.nethackrc"
2019-12-17 00:41:55 -05:00
nhmall
a2a000656f mistake file 2019-12-15 17:59:48 -05:00
nhmall
3ad628d1e5 more makedefs 2019-12-15 17:41:27 -05:00
nhmall
c201c5608b report post-release in makedefs if someone happens to build post-release code 2019-12-15 17:22:11 -05:00
Patric Mueller
9085093338 Fix compilation on platforms that split the ncurses and tinfo libraries
Some platforms compile ncurses in such a way that the tinfo library needs to
be separately linked in (e.g. Gentoo).

The tinfo library is a low-level library being used by and bundled with
ncurses.

Adding '-ltinfo' to WINTTYLIB in the hint files was considered the most robust
solution to this problem.  This still works on systems with ncurses 5.9.
Using pkg-config was ruled out as the default build of ncurses doesn't install
the necessary files.
2019-12-15 20:38:44 +01:00
nhw_cron
d654a4f5d1 This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-15 13:19:35 -05:00
nhmall
c13695b89d Merge branch 'NetHack-3.6' into housekeeping-to-merge-at-3.6.4-release 2019-12-15 12:44:53 -05:00