Commit d0e8d6a7 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

netapi32: Fixed array overflow (spotted by Coverity).

parent efe2ee56
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment