OpenJDK / amber / amber
changeset 54389:d1ebdef71c73
8210598: Strengthen Windows Access Bridge Support
Reviewed-by: prr, psadhukhan, rhalade, mschoene
author | serb |
---|---|
date | Thu, 27 Sep 2018 12:54:50 -0700 |
parents | cbb8341a127a |
children | 0060e9d7c450 |
files | src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeMessageQueue.cpp |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeMessageQueue.cpp Tue Sep 25 16:49:51 2018 -0700 +++ b/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeMessageQueue.cpp Thu Sep 27 12:54:50 2018 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ #include "AccessBridgePackages.h" // for debugging only #include <windows.h> #include <malloc.h> +#include <new> DEBUG_CODE(extern HWND theDialogWindow); extern "C" { @@ -46,6 +47,9 @@ next = (AccessBridgeQueueElement *) 0; previous = (AccessBridgeQueueElement *) 0; buffer = (char *) malloc(bufsize); + if (buffer == NULL) { + throw std::bad_alloc(); + } memcpy(buffer, buf, bufsize); }