1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-24 11:43:05 +01:00

Fix a case where an array is read out of bounds in cellSpurs.cpp

This commit is contained in:
Lioncash 2014-03-10 03:28:17 -04:00
parent b46cb71324
commit 1aa6e5df95

View File

@ -57,7 +57,7 @@ int cellSpursAttributeEnableSystemWorkload(mem_ptr_t<CellSpursAttribute> attr, c
cellSpurs.Warning("cellSpursAttributeEnableSystemWorkload(attr_addr=0x%x, priority[%u], maxSpu=%u, isPreemptible[%u])",
attr.GetAddr(), priority, maxSpu, isPreemptible);
if(!attr.IsGood()) return CELL_SPURS_CORE_ERROR_NULL_POINTER;
for (int i=0; i<9; i++)
for (int i=0; i<8; i++)
if(priority[i] != 1 || maxSpu == 0) return CELL_SPURS_CORE_ERROR_INVAL;
return CELL_OK;