From cd4f3324ba639c1483b356137e5b6316764918c9 Mon Sep 17 00:00:00 2001 From: "glider@chromium.org" Date: Tue, 6 Sep 2011 08:02:40 +0000 Subject: Fix an out of bound access in GLES2DecoderWithShaderTest.VertexAttribPointer This bug was found by AddressSanitizer TBR=gman Review URL: http://codereview.chromium.org/7828094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99704 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gpu') diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc index 3081ac9..d0c63bd 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc @@ -2826,7 +2826,7 @@ TEST_F(GLES2DecoderWithShaderTest, VertexAttribPointer) { for (GLint size = 0; size < 5; ++size) { for (size_t oo = 0; oo < arraysize(offset_mult); ++oo) { GLuint offset = num_bytes * offset_mult[oo] + offset_offset[oo]; - for (size_t ss = 0; ss <= arraysize(stride_mult); ++ss) { + for (size_t ss = 0; ss < arraysize(stride_mult); ++ss) { GLsizei stride = num_bytes * stride_mult[ss] + stride_offset[ss]; for (int normalize = 0; normalize < 2; ++normalize) { bool index_good = index < static_cast(kNumVertexAttribs); -- cgit v1.1