]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Fix CodeQL issue
authorOwen Smith <owen.smith@cloud.com>
Thu, 16 Nov 2023 15:05:26 +0000 (15:05 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Mon, 11 Dec 2023 12:36:57 +0000 (12:36 +0000)
ProcNumber should be initialized before calling KeGetCurrentProcessorNumberEx
incease the call fails and doesnt populate the PROCESSOR_NUMBER. This function
should never fail but the annotations in Windows headers dont state this
correctly.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
src/xenbus/sync.c

index cf6e12325b5cc1d4ec1d5ae5d595907ab2d94504..4296003b79d95739e5ce998347fbd7d4749419cf 100644 (file)
@@ -265,7 +265,7 @@ SyncWorker(
 {
     PSYNC_CONTEXT       Context = &SyncContext;
     ULONG               Index;
-    PROCESSOR_NUMBER    ProcNumber;
+    PROCESSOR_NUMBER    ProcNumber = { 0 };
     SYNC_REQUEST        Request;
 
     UNREFERENCED_PARAMETER(Dpc);