summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.h
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-09-15 11:27:27 +0200
committerSebastien Hertz <shertz@google.com>2014-09-17 11:52:24 +0200
commitb0b0b496125c16620e99ea4e4a05693c281eccf1 (patch)
treea73507873a28411f843b98701bcd0535d1dc361a /runtime/debugger.h
parent97ca64b01e14de77ba14067b26069405d0dba0bf (diff)
downloadart-b0b0b496125c16620e99ea4e4a05693c281eccf1.zip
art-b0b0b496125c16620e99ea4e4a05693c281eccf1.tar.gz
art-b0b0b496125c16620e99ea4e4a05693c281eccf1.tar.bz2
Avoid crash in StringReference.Value JDWP command
Checks for null or invalid object id. Also checks whether the corresponding object is a java.lang.String. Bug: 17492221 Bug: 15005460 (cherry picked from commit 29259fa6b0514866d2d4bf57d58c1557b26abbb7) Change-Id: I52673bdef6912a4cccf5a6eeecb6e1e817b9dd6b
Diffstat (limited to 'runtime/debugger.h')
-rw-r--r--runtime/debugger.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/debugger.h b/runtime/debugger.h
index ab758ca..e171d78 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -381,7 +381,7 @@ class Dbg {
static JDWP::JdwpError SetStaticFieldValue(JDWP::FieldId field_id, uint64_t value, int width)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- static std::string StringToUtf8(JDWP::ObjectId string_id)
+ static JDWP::JdwpError StringToUtf8(JDWP::ObjectId string_id, std::string* str)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static void OutputJValue(JDWP::JdwpTag tag, const JValue* return_value, JDWP::ExpandBuf* pReply)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);