USB: Fix integer overflow on IOP memory range check

This commit is contained in:
TheLastRar 2020-11-19 12:29:22 +00:00 committed by lightningterror
parent 85c3ee823f
commit f25091414e
1 changed files with 1 additions and 1 deletions

View File

@ -621,7 +621,7 @@ void USBasync(u32 cycles)
int cpu_physical_memory_rw(u32 addr, u8* buf, size_t len, int is_write) int cpu_physical_memory_rw(u32 addr, u8* buf, size_t len, int is_write)
{ {
// invalid address, reset and try again // invalid address, reset and try again
if (addr + len >= 0x200000) if ((u64)addr + len >= 0x200000)
{ {
if (qemu_ohci) if (qemu_ohci)
ohci_soft_reset(qemu_ohci); ohci_soft_reset(qemu_ohci);