From daac6ee17f735f3cdfe0e8dfabff56e9b9cc60f5 Mon Sep 17 00:00:00 2001 From: prr Date: Wed, 13 Jun 2018 10:14:15 -0700 Subject: [PATCH] 8203499: Uninitialised memory in WinAccessBridge.cpp Reviewed-by: serb --- src/windows/native/sun/bridge/WinAccessBridge.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/windows/native/sun/bridge/WinAccessBridge.cpp b/src/windows/native/sun/bridge/WinAccessBridge.cpp index 20b5d7ca0..ea11414ca 100644 --- a/src/windows/native/sun/bridge/WinAccessBridge.cpp +++ b/src/windows/native/sun/bridge/WinAccessBridge.cpp @@ -452,7 +452,7 @@ WinAccessBridge::queuePackage(char *buffer, long bufsize) { */ BOOL WinAccessBridge::receiveAQueuedPackage() { - AccessBridgeQueueElement *element; + AccessBridgeQueueElement *element = NULL; PrintDebugString("in WinAccessBridge::receiveAQueuedPackage()"); @@ -464,15 +464,6 @@ WinAccessBridge::receiveAQueuedPackage() { 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: -- GitLab