diff options
| author | Andre Muezerie <[email protected]> | 2026-04-27 14:46:12 -0400 |
|---|---|---|
| committer | Andre Muezerie <[email protected]> | 2026-04-27 14:46:12 -0400 |
| commit | d52da24eff0bc1f80c99d843e6e2846e21b73dac (patch) | |
| tree | 78073f64d3ed2bf9eeda844c4089a94672f0ee7c /network/ndis/ndisprot/6x | |
| parent | 7652eb722d8e128d15b079d5c9ce5f1dee5be11d (diff) | |
Potentially uninitialized variable in ndisbind.c
These changes eliminate the warnings about uninitialized variables under network\ndis.
A macro was also added to prottest.c to suppress a (false) buffer overrun.
Diffstat (limited to 'network/ndis/ndisprot/6x')
| -rw-r--r-- | network/ndis/ndisprot/6x/sys/debug.c | 8 | ||||
| -rw-r--r-- | network/ndis/ndisprot/6x/sys/ndisbind.c | 2 | ||||
| -rw-r--r-- | network/ndis/ndisprot/6x/test/prottest.c | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/network/ndis/ndisprot/6x/sys/debug.c b/network/ndis/ndisprot/6x/sys/debug.c index 40e90984..db2c389c 100644 --- a/network/ndis/ndisprot/6x/sys/debug.c +++ b/network/ndis/ndisprot/6x/sys/debug.c @@ -43,7 +43,7 @@ ndisprotAuditAllocMem( ) { PVOID pBuffer; - PNPROTD_ALLOCATION pAllocInfo; + PNPROTD_ALLOCATION pAllocInfo = NULL; if (!ndisprotdInitDone) { @@ -88,7 +88,7 @@ ndisprotAuditAllocMem( ndisprotdMemoryTail->Next = pAllocInfo; } ndisprotdMemoryTail = pAllocInfo; - + ndisprotdAllocCount++; NdisReleaseSpinLock(&(ndisprotdMemoryLock)); } @@ -295,9 +295,9 @@ ndisprotFreeDbgLock( VOID ) { - + ASSERT(ndisprotdSpinLockInitDone == 1); - + ndisprotdSpinLockInitDone = 0; NdisFreeSpinLock(&(ndisprotdLockLock)); } diff --git a/network/ndis/ndisprot/6x/sys/ndisbind.c b/network/ndis/ndisprot/6x/sys/ndisbind.c index 5257d3a2..87d1f70b 100644 --- a/network/ndis/ndisprot/6x/sys/ndisbind.c +++ b/network/ndis/ndisprot/6x/sys/ndisbind.c @@ -70,7 +70,7 @@ Return Value: --*/ { - PNDISPROT_OPEN_CONTEXT pOpenContext; + PNDISPROT_OPEN_CONTEXT pOpenContext = NULL; NDIS_STATUS Status; UNREFERENCED_PARAMETER(ProtocolDriverContext); diff --git a/network/ndis/ndisprot/6x/test/prottest.c b/network/ndis/ndisprot/6x/test/prottest.c index 54af3ddc..c743bed5 100644 --- a/network/ndis/ndisprot/6x/test/prottest.c +++ b/network/ndis/ndisprot/6x/test/prottest.c @@ -379,6 +379,7 @@ GetSrcMac( BytesReturned)); #pragma warning(suppress:6202) // buffer overrun warning - enough space allocated in QueryBuffer + // codeql[cpp/buffer-overflow] memcpy(pSrcMacAddr, pQueryOid->Data, MAC_ADDR_LEN); } else |
