summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/DataExtractor.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-02-26 19:00:23 +0000
committerEnrico Granata <egranata@apple.com>2015-02-26 19:00:23 +0000
commitb523deaa3864e467ab423483200d343006a7cd73 (patch)
tree7d1cc86c54eed623b9116ba0330cd34362cdec0c /lldb/source/Core/DataExtractor.cpp
parent221f467185790f7369052c7d39f3dba63c2fccc9 (diff)
downloadbcm5719-llvm-b523deaa3864e467ab423483200d343006a7cd73.tar.gz
bcm5719-llvm-b523deaa3864e467ab423483200d343006a7cd73.zip
Fix a bug where LLDB could be convinced to attempt to extract a bitfield of size 0, and consequently crash
llvm-svn: 230661
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r--lldb/source/Core/DataExtractor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp
index 6e1d63095cf..b4b43ed9778 100644
--- a/lldb/source/Core/DataExtractor.cpp
+++ b/lldb/source/Core/DataExtractor.cpp
@@ -1710,7 +1710,7 @@ DataExtractor::Dump (Stream *s,
{
size_t complex_int_byte_size = item_byte_size / 2;
- if (complex_int_byte_size <= 8)
+ if (complex_int_byte_size > 0 && complex_int_byte_size <= 8)
{
s->Printf("%" PRIu64, GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
s->Printf(" + %" PRIu64 "i", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
OpenPOWER on IntegriCloud