[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] Fix CodeQL issue



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@xxxxxxxxx>
---
 src/xenbus/sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xenbus/sync.c b/src/xenbus/sync.c
index cf6e123..4296003 100644
--- a/src/xenbus/sync.c
+++ b/src/xenbus/sync.c
@@ -265,7 +265,7 @@ SyncWorker(
 {
     PSYNC_CONTEXT       Context = &SyncContext;
     ULONG               Index;
-    PROCESSOR_NUMBER    ProcNumber;
+    PROCESSOR_NUMBER    ProcNumber = { 0 };
     SYNC_REQUEST        Request;
 
     UNREFERENCED_PARAMETER(Dpc);
-- 
2.41.0.windows.3




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.