mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-10-12 02:09:17 +00:00
cellVoice: do not allow more than CELLVOICE_MAX_PORT ports
This commit is contained in:
@@ -167,7 +167,7 @@ error_code cellVoiceCreatePort(vm::ptr<u32> portId, vm::cptr<CellVoicePortParam>
|
||||
return CELL_VOICE_ERROR_ARGUMENT_INVALID;
|
||||
}
|
||||
|
||||
if (manager.ports.size() > CELLVOICE_MAX_PORT)
|
||||
if (manager.ports.size() >= CELLVOICE_MAX_PORT)
|
||||
return CELL_VOICE_ERROR_RESOURCE_INSUFFICIENT;
|
||||
|
||||
// Id: bits [8,15] seem to contain a "random" value
|
||||
@@ -427,6 +427,8 @@ error_code cellVoiceInitEx(vm::ptr<CellVoiceInitParam> pArg)
|
||||
|
||||
auto& manager = g_fxo->get<voice_manager>();
|
||||
|
||||
std::lock_guard lock(manager.mtx);
|
||||
|
||||
if (manager.is_init)
|
||||
return CELL_VOICE_ERROR_LIBVOICE_INITIALIZED;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user