# HG changeset patch # User Michael Pavone # Date 1736407807 28800 # Node ID c30f0a288ccf3a5d773a84a90fc65720ad5269d0 # Parent e3575bb1273a14ea941b51acf4ac1d4c6770af3d Fix out of bounds buffer access when loading a cue sheet > 2048 bytes via file browser or drag and drop diff -r e3575bb1273a -r c30f0a288ccf system.c --- a/system.c Sat Jan 04 22:49:06 2025 -0800 +++ b/system.c Wed Jan 08 23:30:07 2025 -0800 @@ -233,12 +233,14 @@ romclose(f); if (!strcasecmp(dst->extension, "cue")) { if (parse_cue(dst)) { + ret = dst->size; if (stype) { *stype = SYSTEM_SEGACD; } } } else if (!strcasecmp(dst->extension, "toc")) { if (parse_toc(dst)) { + ret = dst->size; if (stype) { *stype = SYSTEM_SEGACD; }