From ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:12:36 +0000 Subject: Vendor import of lldb trunk r321017: https://llvm.org/svn/llvm-project/lldb/trunk@321017 --- source/Core/DumpDataExtractor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/Core/DumpDataExtractor.cpp') diff --git a/source/Core/DumpDataExtractor.cpp b/source/Core/DumpDataExtractor.cpp index c2a9115c3068..e564e86478fc 100644 --- a/source/Core/DumpDataExtractor.cpp +++ b/source/Core/DumpDataExtractor.cpp @@ -272,6 +272,13 @@ lldb::offset_t lldb_private::DumpDataExtractor( case eFormatChar: case eFormatCharPrintable: case eFormatCharArray: { + // Reject invalid item_byte_size. + if (item_byte_size > 8) { + s->Printf("error: unsupported byte size (%" PRIu64 ") for char format", + (uint64_t)item_byte_size); + return offset; + } + // If we are only printing one character surround it with single // quotes if (item_count == 1 && item_format == eFormatChar) -- cgit v1.2.3