mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2025-02-01 06:52:11 +01:00
moved array sanity check to before the array access
This commit is contained in:
parent
8d7f201155
commit
1ba231ff76
@ -402,7 +402,7 @@ struct DPCDHALImpl : DPCDHAL
|
||||
if (caps.linkRateTable[0] != 0)
|
||||
{
|
||||
bIndexedLinkrateCapable = true;
|
||||
for (int i = 0; caps.linkRateTable[i] && (i < NV_DPCD_SUPPORTED_LINK_RATES__SIZE); i++)
|
||||
for (int i = 0; (i < NV_DPCD_SUPPORTED_LINK_RATES__SIZE) && caps.linkRateTable[i]; i++)
|
||||
{
|
||||
if (linkRate < caps.linkRateTable[i])
|
||||
linkRate = caps.linkRateTable[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user