early-roguelike/rogue4
John "Elwin" Edwards ab25967717 Fix potential segfaults at restore related to ctime().
In some games, restore() passes the result of ctime() to mvprintw() or
some other variadic message-formatting function.  If ctime() has not
been declared properly, its return type is inferred to be int instead
of char *.  This does not cause a warning because the compiler does not
know the correct type of variadic arguments.

On platforms where ints and pointers are not the same size, this can,
probably depending on alignment, result in a segfault that is not easy
to trace.

Including time.h fixes the problem.  Some games manually declared
ctime() and avoided the bug.  These declarations have also been
replaced with the include.
2017-09-15 20:51:10 -04:00
..
acinclude.m4 rogue4: ported to autoconf. 2011-10-11 15:20:40 +00:00
armor.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
chase.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
command.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
configure.ac Remove an extra bracket from some Autoconf macros. 2017-09-10 17:30:13 -04:00
daemon.c Daemons and fuses now return void. 2016-03-05 20:49:37 -05:00
daemons.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
extern.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
extern.h Fix potential segfaults at restore related to ctime(). 2017-09-15 20:51:10 -04:00
fight.c Rogue V[345], Super-Rogue: Fix violet fungi/venus flytraps. 2016-05-01 19:39:56 -04:00
findpw.c Import Rogue 5.2 from the Roguelike Restoration Project (r1490) 2009-10-24 16:52:52 +00:00
init.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
io.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
LICENSE.TXT Import Rogue 5.2 from the Roguelike Restoration Project (r1490) 2009-10-24 16:52:52 +00:00
list.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
mach_dep.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
main.c Use more portable random seed generation. 2017-01-28 15:49:41 -05:00
Makefile.in Makefiles: don't rely on built-in implicit rules. 2016-03-08 19:45:41 -05:00
mdport.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
misc.c Declare some function arguments as const. 2016-03-06 19:32:47 -05:00
monsters.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
move.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
new_level.c Use more portable random seed generation. 2017-01-28 15:49:41 -05:00
options.c Use uniform return types for functions related to options. 2016-03-06 14:45:18 -05:00
pack.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
passages.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
potions.c Rogue V4, V5: disable a cheat granting permanent monster detection. 2016-03-05 12:10:20 -05:00
prob.c Import Rogue 5.2 from the Roguelike Restoration Project (r1490) 2009-10-24 16:52:52 +00:00
rings.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
rip.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
rogue.6.in Generate text documentation from the troff source files. 2016-02-21 20:47:12 -05:00
rogue.h Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
rogue.me.in rogue4: ported to autoconf. 2011-10-11 15:20:40 +00:00
rogue4.vcxproj Enable the logfile on 64-bit Windows. 2016-05-17 21:28:34 -04:00
rogue4.vcxproj.filters Update the Visual Studio project files. 2015-08-18 13:23:56 -04:00
rooms.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
save.c Fix potential segfaults at restore related to ctime(). 2017-09-15 20:51:10 -04:00
scrolls.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
state.c Use C stdio functions for score files and save files. 2017-09-15 19:57:54 -04:00
sticks.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
things.c Rogue V4, V5: fix messages when viewing the identified items. 2016-04-24 13:33:17 -04:00
vers.c Import Rogue 5.2 from the Roguelike Restoration Project (r1490) 2009-10-24 16:52:52 +00:00
weapons.c rogue4: fix most GCC5 warnings. 2016-01-27 19:41:05 -05:00
wizard.c Rogue V[345], Super-Rogue: Fix violet fungi/venus flytraps. 2016-05-01 19:39:56 -04:00
xcrypt.c Import Rogue 5.2 from the Roguelike Restoration Project (r1490) 2009-10-24 16:52:52 +00:00
xstr.c Import Rogue 5.2 from the Roguelike Restoration Project (r1490) 2009-10-24 16:52:52 +00:00