Files
AllgemeinerProblemLoeser/source
niklascfw ef9c1eaf7a Fix data abort crash in Mac special files removal (listdir)
The listdir function had three memory corruption bugs causing a
data abort (Err:19) on the Switch:

1. Heap buffer overflow: CpyStr("sd:/") allocated only 5 bytes but
   listdir appends full subdirectory paths in-place via memcpy.
   Fixed by using a 1024-byte stack buffer instead.

2. Use-after-free: _DeleteFileSimple(path) freed the shared traversal
   buffer, but the loop continued using it. Fixed by inlining f_unlink
   without freeing.

3. Recursive free + missing else: free(path) at the end of listdir
   freed the buffer shared across all recursive frames, and a missing
   else caused recursion into directories that were just deleted.
   Removed the free and added an else guard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 21:16:58 +01:00
..
2023-04-02 16:37:24 +08:00
2025-11-21 22:20:38 +08:00
2024-04-13 12:27:17 +08:00
2023-02-25 00:33:58 +08:00
2023-04-02 13:21:57 +08:00
2024-04-13 12:27:17 +08:00
2025-11-21 22:20:38 +08:00
2020-12-23 17:39:22 +01:00
2020-12-31 12:55:26 +01:00
2020-12-31 12:55:26 +01:00
2020-12-23 17:39:22 +01:00
2025-11-21 22:20:38 +08:00
2020-12-25 21:16:24 +01:00