You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
minarch: core extension list overflows for VICE cores, segfaults when NULL #879
minarch to copy a core's valid_extensions without overflowing, and to load cores that don't set it.
What happened
Core_open() (ma_core.c:67) copies valid_extensions into the 128-byte core.extensions with strcpy().
In v6.15.0, vice_x64, vice_x128, vice_xpet and vice_xplus4 report 128 characters and vice_xvic reports 142. The copy overflows and the list is left unterminated. Cheat_getPaths() and Game_open() (for .zip files) then copy it into their own 128-byte buffers. The length check in Cheat_getPaths() is compiled out of the h700 and tg5040 builds; its log message isn't in either v6.15.0 binary. On an RG28XX, launching game.zip from a C64 folder makes the cheat lookup try game.tcrtgame.cht instead of game.tcrt.cht. I didn't see a crash.
A core that leaves valid_extensions NULL, such as libretro's 2048, makes minarch segfault in Core_open().
The four lists reached 128 characters with vice-libretro b324795 (2026-09-22). NextUI builds VICE without a pinned hash. The strcpy() is inherited from MinUI.
Steps to reproduce
On an RG28XX with v6.15.0, put game.zip in a C64 ROM folder and launch it. The log shows Checking cheat path: .../game.tcrtgame.cht.
Run minarch with an unmodified libretro-2048 build. It segfaults in Core_open().
Device and firmware
RG28XX, stock OS, with the NextUI v6.15.0 runtime and cores, started from a script (a full install needs a second card). The NULL crash and the overflow (checked in lldb) also reproduce on the desktop build at 5291344.
I used Claude Code (Claude Opus 5.5, xhigh effort) to investigate this and write it up.
Activity