shithub: psxe

Download patch

ref: 55738fca55b0cad5e278ff1a1271df75ade8b31a
parent: 93dd1f50e171d69f8fd9e9f929ae488850f3e4b2
author: allkern <lisandroaalarcon@gmail.com>
date: Mon Sep 4 08:09:39 EDT 2023

Start working on DISC error reporting

--- a/psx/disc/cue.c
+++ b/psx/disc/cue.c
@@ -348,6 +348,9 @@
 
     log_fatal("CUE seek to %02u:%02u:%02u (%08x < %08x)", msf.m, msf.s, msf.f, cue->seek_offset, cue->buf_size);
 
+    if (cue->seek_offset >= cue->buf_size)
+        return DISC_ERR_ADDR_OUT_OF_BOUNDS;
+
     return 0;
 }
 
--