Commit Graph

17 Commits

Author SHA1 Message Date
Jan Engelhardt
5f0bdf8184 Fix spello "it's" 2024-09-03 13:26:51 +02:00
Jan Engelhardt
a3a31c77a2 Fix spello "seperate.." 2024-09-03 13:26:51 +02:00
Jan Engelhardt
cf748b719e Resolve out-of-bounds access restoring game for level 4
srcpath "hudburn.ogf"
srcpath "hudburn.ogf"
srcpath "shieldinv.ogf"
srcpath "shieldinv.ogf"
srcpath "level4"
==61849==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f8665855daf at pc 0x000001019268 bp 0x7ffeaad45fc0 sp 0x7ffeaad45fb8
READ of size 1 at 0x7f8665855daf thread T0
    f0 0x1019267 in ddio_SplitPath(char const*, char*, char*, char*) $GIT/ddio/lnxfile.cpp:134
    f1 Osiris_FindLoadedModule(char*) $GIT/Descent3/OsirisLoadandBind.cpp:775
    f2 Osiris_RestoreSystemState(CFILE*) $GIT/Descent3/OsirisLoadandBind.cpp:2774
    f3 LoadGameState(char const*) $GIT/Descent3/loadstate.cpp:387
    f4 LoadCurrentSaveGame() $GIT/Descent3/gamesave.cpp:709
    f5 GameSequencer() $GIT/Descent3/gamesequence.cpp:1239
    f6 PlayGame() $GIT/Descent3/game.cpp:834
    f7 MainLoop() $GIT/Descent3/descent.cpp:550
    f8 Descent3() $GIT/Descent3/descent.cpp:508
    f9 oeD3LnxApp::run() $GIT/Descent3/sdlmain.cpp:151

Address 0x7f8665855daf is located in stack of thread T0 at offset 431 in frame
    f0 Osiris_RestoreSystemState(CFILE*) $GIT/Descent3/OsirisLoadandBind.cpp:2685

  This frame has 3 object(s):
    [32, 72) 'ei' (line 2791)
    [112, 368) 'tag' (line 2690)
    [432, 692) 'read_module_name' (line 2761) <== Memory access at offset 431 underflows this variable
2024-08-30 02:37:42 +02:00
Azamat H. Hackimov
79db9aa3e2 Move platform-specific defines and macros to own file crossplat.h 2024-08-20 23:09:27 +03:00
Azamat H. Hackimov
54f9d75e62 Reduce linux_fix.h usage in project 2024-08-20 23:08:10 +03:00
Azamat H. Hackimov
36080f1f08 DDIO: Delete unused ddio_GetRootFromPath() 2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
842ef19bfd Implement root mount points (drives) in DoPathFileDialog()
List root mount points / drives in separate listbox.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
7c4a4d2566 DDIO: remove DLLddio_FindFileStart functions as unused
Cleanup code in core and netcon.
2024-08-15 11:50:36 +03:00
Azamat H. Hackimov
ec065b2a07 DDIO: remove unused ddio_GetFullPath() 2024-08-15 11:47:43 +03:00
Azamat H. Hackimov
de49da0e9a DDIO: Remove unused platform-dependent functions
Remove ddio_CreateDir(), ddio_RemoveDir(), ddio_SaveWorkingDir(), ddio_RestoreWorkingDir(), ddio_DirExists(). Replace them in code with std::fs alternatives.
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
81555afd15 CFILE: convert cf_Diff() to use std::fs::path
Convert cf_Diff() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Azamat H. Hackimov
c47210be75 CFILE: convert cf_CopyFile() cf_CopyFileTime() to use std::fs::path
Convert cf_CopyFile() cf_CopyFileTime() and underlying functions to use std::filesystem::path
2024-07-01 12:50:49 +03:00
Chris Sarbora
652ef55f9a
Remove GLOB_PERIOD from ddio_FindFileStart
GLOB_PERIOD is a GNU extension and is not supported on non-glibc
2024-06-24 02:08:36 -05:00
Azamat H. Hackimov
908f490396 Remove unused ddio_RenameFile() 2024-06-17 22:30:42 +03:00
Azamat H. Hackimov
7db03a4ebf Make lockfile functions cross-platform
Unify all ddio_*LockFile() functions using std::filesystem.
2024-06-17 21:32:01 +03:00
GravisZro
9cf9781369 Properly format/use variadic macros 2024-05-24 20:57:17 -04:00
Azamat H. Hackimov
a0929aefe2 Rename ddio_common to ddio 2024-05-24 22:18:14 +03:00