netapi32: Fixed array overflow (spotted by Coverity).

This commit is contained in:
Marcus Meissner 2007-03-02 08:40:34 +01:00 committed by Alexandre Julliard
parent efe2ee560e
commit d0e8d6a7ba
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ BOOL NetBIOSRegisterAdapter(ULONG transport, DWORD ifIndex, void *data)
data);
for (i = 0; i < gNumTransports && gTransports[i].id != transport; i++)
;
if (gTransports[i].id == transport)
if ((i < gNumTransports) && gTransports[i].id == transport)
{
NetBIOSTransport *transportPtr = &gTransports[i].transport;