8040808: Uninitialised memory in OGLBufImgsOps.c, D3DBufImgOps.cpp
Reviewed-by: serb, pchelko
--- a/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c Mon Jul 14 09:48:26 2014 -0700
+++ b/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c Mon Jul 14 10:29:23 2014 -0700
@@ -636,6 +636,9 @@
"OGLBufImgOps_EnableLookupOp: short=%d num=%d len=%d off=%d",
shortData, numBands, bandLength, offset);
+ for (i = 0; i < 4; i++) {
+ bands[i] = NULL;
+ }
RETURN_IF_NULL(oglc);
RETURN_IF_NULL(srcOps);
RESET_PREVIOUS_OP();
--- a/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp Mon Jul 14 09:48:26 2014 -0700
+++ b/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp Mon Jul 14 10:29:23 2014 -0700
@@ -201,6 +201,9 @@
int i;
jint flags = 0;
+ for (i = 0; i < 4; i++) {
+ bands[i] = NULL;
+ }
J2dTraceLn4(J2D_TRACE_INFO,
"D3DBufImgOps_EnableLookupOp: short=%d num=%d len=%d off=%d",
shortData, numBands, bandLength, offset);