Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1113)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2699033003: A potential use of uninitialized data on buggy driver impl. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 1b5da7677200aa992fd5f21e47630bd66e76aa5b..80d7234db1a14a553dffb18d6158a0b66afbb85b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -6885,6 +6885,7 @@ void GLES2DecoderImpl::DoGetBooleanv(GLenum pname,
GLsizei params_size) {
DCHECK(params);
std::unique_ptr<GLint[]> values(new GLint[params_size]);
+ memset(values.get(), 0, params_size * sizeof(GLint));
DoGetIntegerv(pname, values.get(), params_size);
for (GLsizei ii = 0; ii < params_size; ++ii) {
params[ii] = static_cast<GLboolean>(values[ii]);
@@ -6912,6 +6913,7 @@ void GLES2DecoderImpl::DoGetFloatv(GLenum pname,
}
std::unique_ptr<GLint[]> values(new GLint[params_size]);
+ memset(values.get(), 0, params_size * sizeof(GLint));
DoGetIntegerv(pname, values.get(), params_size);
for (GLsizei ii = 0; ii < params_size; ++ii) {
params[ii] = static_cast<GLfloat>(values[ii]);
@@ -6942,6 +6944,7 @@ void GLES2DecoderImpl::DoGetInteger64v(GLenum pname,
}
std::unique_ptr<GLint[]> values(new GLint[params_size]);
+ memset(values.get(), 0, params_size * sizeof(GLint));
DoGetIntegerv(pname, values.get(), params_size);
for (GLsizei ii = 0; ii < params_size; ++ii) {
params[ii] = static_cast<GLint64>(values[ii]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698