@cryptotaxi247 / netdata-1 / commits / 6447b838d

perflib: do not dereference null pointer (#19985)

do not dereference null pointer

Costa Tsaousis committed Mar 27, 2025 at 17:31 UTC 6447b838d6830bf9debec004c8345093c232caf9
1 file changed +3
src/libnetdata/os/windows-perflib/perflib.c
+3
@@ -65,6 +65,9 @@ static BOOL getCounterData(
65 PERF_COUNTER_DEFINITION* pBaseCounter = NULL;
66 BOOL fSuccess = TRUE;
67
68 + if(!pCounterDataBlock)
69 + return FALSE;
70 +
71 //Point to the raw counter data.
72 pData = (PVOID)((LPBYTE)pCounterDataBlock + pCounter->CounterOffset);
73