[OpenJDK 2D-Dev] [XS] RFR : JDK-8204085: avoid printing uninitialized pointer in java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
Langer, Christoph
christoph.langer at sap.com
Wed May 30 14:01:21 UTC 2018
Hi Matthias,
maybe the code would become nicer if you do it like this:
...
jobject localObj = env->NewLocalRef(wsdo->peer);
PDATA pData = localObj == NULL ? NULL : JNI_GET_PDATA(localObj);
if (pData == NULL) {
...
But the change is very trivial and I would be fine with it, as you did in the webrev. Do whatever is more convenient to you, no need for another webrev.
And make sure you push it to the client repo...
Best regards
Christoph
From: Baesken, Matthias
Sent: Mittwoch, 30. Mai 2018 15:33
To: 2d-dev <2d-dev at openjdk.java.net>
Cc: Langer, Christoph <christoph.langer at sap.com>
Subject: [XS] RFR : JDK-8204085: avoid printing uninitialized pointer in java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
Hi could I please get reviews for this very small change :
In java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp , function GDIWindowSurfaceData_GetComp,
we might print pointer pData in uninitialized state.
This occurs in case localObj == NULL , then we would print pData without initialization.
The small fix adds initialization to pData :
Bug:
https://bugs.openjdk.java.net/browse/JDK-8204085
change :
http://cr.openjdk.java.net/~mbaesken/webrevs/8204085/
Thanks, Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20180530/f0e46884/attachment.html>
More information about the 2d-dev
mailing list