diff options
author | Justin Berger <j.david.berger@gmail.com> | 2017-07-21 03:18:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-31 19:35:46 (GMT) |
commit | 124424e9974ade26521bf4751f3701c1e7d91c3d (patch) | |
tree | 7ba1f93ae1fe351cd5fd04fbeb9ca30e94c78dee /Source/cmServerConnection.cxx | |
parent | 693fa0a96e111270337eb76a4da1255774657e1a (diff) | |
download | CMake-124424e9974ade26521bf4751f3701c1e7d91c3d.zip CMake-124424e9974ade26521bf4751f3701c1e7d91c3d.tar.gz CMake-124424e9974ade26521bf4751f3701c1e7d91c3d.tar.bz2 |
server: Protect several fields from potentially pointing to bad memory
Diffstat (limited to 'Source/cmServerConnection.cxx')
-rw-r--r-- | Source/cmServerConnection.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index e686403..44af75f 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -53,6 +53,9 @@ void cmStdIoConnection::SetupStream(uv_stream_t*& stream, int file_id) void cmStdIoConnection::SetServer(cmServerBase* s) { cmConnection::SetServer(s); + if (!s) { + return; + } SetupStream(this->ReadStream, 0); SetupStream(this->WriteStream, 1); |