Commit b8fc82b1 authored by psj@chromium.org's avatar psj@chromium.org

Fix memory overwrite when sending error code on socket

BUG=357593
NOTRY=true

Review URL: https://codereview.chromium.org/216693005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260335 0039d316-1c4b-4281-b951-d872f2087c98
parent e69de2a5
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "remoting/host/gnubby_socket.h" #include "remoting/host/gnubby_socket.h"
#include "base/macros.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "net/socket/stream_listen_socket.h" #include "net/socket/stream_listen_socket.h"
...@@ -75,7 +76,7 @@ void GnubbySocket::SendResponse(const std::string& response_data) { ...@@ -75,7 +76,7 @@ void GnubbySocket::SendResponse(const std::string& response_data) {
void GnubbySocket::SendSshError() { void GnubbySocket::SendSshError() {
DCHECK(CalledOnValidThread()); DCHECK(CalledOnValidThread());
SendResponse(kSshError); SendResponse(std::string(kSshError, arraysize(kSshError)));
} }
bool GnubbySocket::IsSocket(net::StreamListenSocket* socket) const { bool GnubbySocket::IsSocket(net::StreamListenSocket* socket) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment