8203499: Uninitialised memory in WinAccessBridge.cpp
authorprr
Tue, 05 Jun 2018 14:42:21 -0700
changeset 50483 10b8e57899b3
parent 50482 18f8e3b6f3b7
child 50484 f8c15a2f2ae9
8203499: Uninitialised memory in WinAccessBridge.cpp Reviewed-by: serb
src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp
--- a/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp	Mon Jun 04 20:32:19 2018 -0700
+++ b/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp	Tue Jun 05 14:42:21 2018 -0700
@@ -452,7 +452,7 @@
  */
 BOOL
 WinAccessBridge::receiveAQueuedPackage() {
-    AccessBridgeQueueElement *element;
+    AccessBridgeQueueElement *element = NULL;
 
     PrintDebugString("in WinAccessBridge::receiveAQueuedPackage()");
 
@@ -464,15 +464,6 @@
 
         QueueReturns result = messageQueue->remove(&element);
 
-        PrintDebugString("   'element->buffer' contains:");
-        DEBUG_CODE(PackageType *type = (PackageType *) element->buffer);
-        DEBUG_CODE(FocusGainedPackageTag *pkg = (FocusGainedPackageTag *) (((char *) element->buffer) + sizeof(PackageType)));
-        DEBUG_CODE(PrintDebugString("     PackageType = %X", *type));
-#ifdef ACCESSBRIDGE_ARCH_LEGACY // JOBJECT64 is jobject (32 bit pointer)
-        DEBUG_CODE(PrintDebugString("     EventPackage: vmID = %X, event = %p, source = %p", pkg->vmID, pkg->Event, pkg->AccessibleContextSource));
-#else // JOBJECT64 is jlong (64 bit)
-        DEBUG_CODE(PrintDebugString("     EventPackage: vmID = %X, event = %016I64X, source = %016I64X", pkg->vmID, pkg->Event, pkg->AccessibleContextSource));
-#endif
         switch (result) {
 
         case cQueueBroken: