Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/games/hack
On Sun, Jul 30, 2023 at 09:23:22AM +0000, Masatake Daimon wrote:
> Modified Files:
> src/games/hack: hack.o_init.c
>
> Log Message:
> hack(6): Fix a segfault that occurs when ASLR is enabled
>
> Prior to this change, savenames() would store "objects" in save files as a
> blob, and restnames() would load it and overwrite "objects". But since
> objclass::oc_name and oc_descr are pointers to string constants, they would
> be invalid when the next time the process is spawned, and opening the
> inventory would crash by dereferencing invalid pointers.
Huh. How'd this not also break every recompile? (Or at least every
recompile with slightly different code size...)
I thought I had audited all the save formats in games but maybe I
never got to hack...
(The change changes the on-disk format, right? But there's probably no
easy way around that)
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index