summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBValue.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-12-15 01:55:36 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-12-15 01:55:36 +0000
commit95873a68f42e278072f8b0bf253c50defd9de037 (patch)
treea4e93c83f9723a7d301d7632cc683f6bc61bedfe /lldb/source/API/SBValue.cpp
parent30373150a1a164fa3374ea2e99a258c8e93d732e (diff)
downloadbcm5719-llvm-95873a68f42e278072f8b0bf253c50defd9de037.tar.gz
bcm5719-llvm-95873a68f42e278072f8b0bf253c50defd9de037.zip
http://llvm.org/bugs/show_bug.cgi?id=11579
lldb::SBValue::CreateValueFromAddress does not verify SBType::GetPointerType succeeds SBValue::CreateValueFromAddress() should check the validity of type and its derived pointer type before using it. Add a test case. llvm-svn: 146629
Diffstat (limited to 'lldb/source/API/SBValue.cpp')
-rw-r--r--lldb/source/API/SBValue.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index c7ab54999ca..c9f78e2cf1f 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -404,9 +404,8 @@ lldb::SBValue
SBValue::CreateValueFromAddress(const char* name, lldb::addr_t address, SBType type)
{
lldb::SBValue result;
- if (m_opaque_sp)
+ if (m_opaque_sp && type.IsValid() && type.GetPointerType().IsValid())
{
-
SBType real_type(type.GetPointerType());
lldb::DataBufferSP buffer(new lldb_private::DataBufferHeap(&address,sizeof(lldb::addr_t)));
OpenPOWER on IntegriCloud