summaryrefslogtreecommitdiffstats
path: root/runtime/jdwp
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-08-28 18:50:36 +0200
committerSebastien Hertz <shertz@google.com>2014-08-28 18:51:18 +0200
commit60ed7da4d193e0f90b05c4236af77d3b276c0ea4 (patch)
treec910fe44c447c67fba9c2725f2f01c7a5a34ca5a /runtime/jdwp
parent9c18858899738f79e75b5a31a96b91c8bfa8bdd7 (diff)
downloadart-60ed7da4d193e0f90b05c4236af77d3b276c0ea4.zip
art-60ed7da4d193e0f90b05c4236af77d3b276c0ea4.tar.gz
art-60ed7da4d193e0f90b05c4236af77d3b276c0ea4.tar.bz2
Avoid null pointer dereference when sending JDWP packets
Bug: 16218394 Change-Id: Id0ab09401b01f3041ea36013330a000d7702d8fa
Diffstat (limited to 'runtime/jdwp')
-rw-r--r--runtime/jdwp/jdwp_main.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/jdwp/jdwp_main.cc b/runtime/jdwp/jdwp_main.cc
index 4155c82..a4f427c 100644
--- a/runtime/jdwp/jdwp_main.cc
+++ b/runtime/jdwp/jdwp_main.cc
@@ -143,7 +143,7 @@ bool JdwpState::IsConnected() {
}
void JdwpState::SendBufferedRequest(uint32_t type, const std::vector<iovec>& iov) {
- if (netState->clientSock < 0) {
+ if (!IsConnected()) {
// Can happen with some DDMS events.
VLOG(jdwp) << "Not sending JDWP packet: no debugger attached!";
return;
@@ -167,7 +167,7 @@ void JdwpState::SendBufferedRequest(uint32_t type, const std::vector<iovec>& iov
}
void JdwpState::SendRequest(ExpandBuf* pReq) {
- if (netState->clientSock < 0) {
+ if (!IsConnected()) {
// Can happen with some DDMS events.
VLOG(jdwp) << "Not sending JDWP packet: no debugger attached!";
return;