From c11f4a2edb8bc23d94865411f232dc461d288068 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Mon, 14 Jul 2014 10:29:23 -0700 Subject: [PATCH] 8040808: Uninitialised memory in OGLBufImgsOps.c, D3DBufImgOps.cpp Reviewed-by: serb, pchelko --- jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c | 3 +++ jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c b/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c index 046018c8115..b7e59341cf2 100644 --- a/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c +++ b/jdk/src/share/native/sun/java2d/opengl/OGLBufImgOps.c @@ -636,6 +636,9 @@ OGLBufImgOps_EnableLookupOp(OGLContext *oglc, jlong pSrcOps, "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(); diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp index 5cf48427950..b8b1ec892c1 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DBufImgOps.cpp @@ -201,6 +201,9 @@ D3DBufImgOps_EnableLookupOp(D3DContext *d3dc, 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);