8040808: Uninitialised memory in OGLBufImgsOps.c, D3DBufImgOps.cpp
authorprr
Mon, 14 Jul 2014 10:29:23 -0700
changeset 25778 998b49cac7e9
parent 25777 bb88947b6766
child 25779 86b8de4f7d09
8040808: Uninitialised memory in OGLBufImgsOps.c, D3DBufImgOps.cpp Reviewed-by: serb, pchelko
jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c
jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp
--- 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);