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

Unified Diff: cc/output/program_binding.cc

Issue 2600113002: Initialize arrays before use. (Closed)
Patch Set: Created 4 years 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: cc/output/program_binding.cc
diff --git a/cc/output/program_binding.cc b/cc/output/program_binding.cc
index ebad2e84b4b01156e4e2933a55af30aa06dff1c5..836df767ba52dad082c19c0bebd6b2f76533f92d 100644
--- a/cc/output/program_binding.cc
+++ b/cc/output/program_binding.cc
@@ -57,7 +57,7 @@ bool ProgramBindingBase::Link(GLES2Interface* context) {
int linked = 0;
context->GetProgramiv(program_, GL_LINK_STATUS, &linked);
if (!linked) {
- char buffer[1024];
+ char buffer[1024] = "";
context->GetProgramInfoLog(program_, sizeof(buffer), nullptr, buffer);
DLOG(ERROR) << "Error compiling shader: " << buffer;
return false;
@@ -96,7 +96,7 @@ unsigned ProgramBindingBase::LoadShader(GLES2Interface* context,
int compiled = 0;
context->GetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
if (!compiled) {
- char buffer[1024];
+ char buffer[1024] = "";
context->GetShaderInfoLog(shader, sizeof(buffer), nullptr, buffer);
DLOG(ERROR) << "Error compiling shader: " << buffer
<< "\n shader program: " << shader_source;
« 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