comparison system.c @ 2551:c30f0a288ccf

Fix out of bounds buffer access when loading a cue sheet > 2048 bytes via file browser or drag and drop
author Michael Pavone <pavone@retrodev.com>
date Wed, 08 Jan 2025 23:30:07 -0800
parents c076a96f1668
children 6404643aca38
comparison
equal deleted inserted replaced
2550:e3575bb1273a 2551:c30f0a288ccf
231 dst->extension = ext; 231 dst->extension = ext;
232 dst->size = ret; 232 dst->size = ret;
233 romclose(f); 233 romclose(f);
234 if (!strcasecmp(dst->extension, "cue")) { 234 if (!strcasecmp(dst->extension, "cue")) {
235 if (parse_cue(dst)) { 235 if (parse_cue(dst)) {
236 ret = dst->size;
236 if (stype) { 237 if (stype) {
237 *stype = SYSTEM_SEGACD; 238 *stype = SYSTEM_SEGACD;
238 } 239 }
239 } 240 }
240 } else if (!strcasecmp(dst->extension, "toc")) { 241 } else if (!strcasecmp(dst->extension, "toc")) {
241 if (parse_toc(dst)) { 242 if (parse_toc(dst)) {
243 ret = dst->size;
242 if (stype) { 244 if (stype) {
243 *stype = SYSTEM_SEGACD; 245 *stype = SYSTEM_SEGACD;
244 } 246 }
245 } 247 }
246 } 248 }