Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/games/hack



Module Name:    src
Committed By:   pho
Date:           Sun Jul 30 09:23:22 UTC 2023

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.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/games/hack/hack.o_init.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index