| Index: remoting/host/remoting_me2me_host.cc
|
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
|
| index fb6907c3f0e8c53c70f62f93f1d6fb0ca70076a2..c6c04eb62f14016eaaca9bcc740c6805a5f4d39f 100644
|
| --- a/remoting/host/remoting_me2me_host.cc
|
| +++ b/remoting/host/remoting_me2me_host.cc
|
| @@ -488,10 +488,11 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
|
|
|
| // Read config from stdin if necessary.
|
| if (host_config_path_ == base::FilePath(kStdinConfigPath)) {
|
| - char buf[4096];
|
| + const size_t kBufferSize = 4096;
|
| + scoped_ptr<char[]> buf(new char[kBufferSize]);
|
| size_t len;
|
| - while ((len = fread(buf, 1, sizeof(buf), stdin)) > 0) {
|
| - host_config_.append(buf, len);
|
| + while ((len = fread(buf.get(), 1, kBufferSize, stdin)) > 0) {
|
| + host_config_.append(buf.get(), len);
|
| }
|
| }
|
| } else {
|
|
|