mirror of https://github.com/PCSX2/pcsx2.git
pcsx2:CDVD: guarantee that index of mg_zones array is below than 8
CID 146917 (#1 of 1): Untrusted array index read (TAINTED_SCALAR) tainted_data: Using tainted variable cdvd.Result[1] as an index into an array mg_zones
This commit is contained in:
parent
8928c3e7f1
commit
6c7ce3465e
|
@ -1767,7 +1767,7 @@ static void cdvdWrite16(u8 rt) // SCOMMAND
|
||||||
|
|
||||||
cdvdGetMechaVer(&cdvd.Result[1]);
|
cdvdGetMechaVer(&cdvd.Result[1]);
|
||||||
cdvdReadRegionParams(&cdvd.Result[3]);//size==8
|
cdvdReadRegionParams(&cdvd.Result[3]);//size==8
|
||||||
DevCon.WriteLn("REGION PARAMS = %s %s", mg_zones[cdvd.Result[1]], &cdvd.Result[3]);
|
DevCon.WriteLn("REGION PARAMS = %s %s", mg_zones[cdvd.Result[1] & 7], &cdvd.Result[3]);
|
||||||
cdvd.Result[1] = 1 << cdvd.Result[1]; //encryption zone; see offset 0x1C in encrypted headers
|
cdvd.Result[1] = 1 << cdvd.Result[1]; //encryption zone; see offset 0x1C in encrypted headers
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
cdvd.Result[2] = 0; //??
|
cdvd.Result[2] = 0; //??
|
||||||
|
|
Loading…
Reference in New Issue