notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
db0d70d
)
Correctly signal errors for out-of-bounds async CD reads
author
Justin Weiss
<justin@justinweiss.com>
Tue, 29 Sep 2020 01:12:17 +0000
(18:12 -0700)
committer
Justin Weiss
<justin@justinweiss.com>
Sat, 10 Oct 2020 22:06:19 +0000
(15:06 -0700)
libpcsxcore/cdriso.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/cdriso.c
b/libpcsxcore/cdriso.c
index
c8eacb8
..
6c6d835
100644
(file)
--- a/
libpcsxcore/cdriso.c
+++ b/
libpcsxcore/cdriso.c
@@
-1260,14
+1260,19
@@
static void *readThreadMain(void *param) {
last_read_sector = requested_sector_end;
}
last_read_sector = requested_sector_end;
}
+ index = ra_sector % SECTOR_BUFFER_SIZE;
+
// check for end of CD
if (ra_count && ra_sector >= max_sector) {
ra_count = 0;
// check for end of CD
if (ra_count && ra_sector >= max_sector) {
ra_count = 0;
+ pthread_mutex_lock(§orbuffer_lock);
+ sectorbuffer[index].ret = -1;
+ sectorbuffer[index].sector = ra_sector;
+ pthread_cond_signal(§orbuffer_cond);
+ pthread_mutex_unlock(§orbuffer_lock);
}
if (ra_count) {
}
if (ra_count) {
-
- index = ra_sector % SECTOR_BUFFER_SIZE;
pthread_mutex_lock(§orbuffer_lock);
if (sectorbuffer[index].sector != ra_sector) {
pthread_mutex_unlock(§orbuffer_lock);
pthread_mutex_lock(§orbuffer_lock);
if (sectorbuffer[index].sector != ra_sector) {
pthread_mutex_unlock(§orbuffer_lock);