From a074f3547aead157046784785fef8ba9f3e78ecb Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 16 Jul 2013 08:19:28 -0400 Subject: [PATCH] Fix incorrect handling of DW_FORM_flag_present. This form implicitly indicates a flag value of true without a corresponding byte in the datastream. As such, we were introducing off by one errors when parsing one. --- src/apps/debugger/dwarf/DwarfFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index 02322bf567..d711d62f6b 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -1257,7 +1257,7 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, value = dataReader.ReadUnsignedLEB128(0); break; case DW_FORM_flag_present: - attributeValue.SetToFlag(dataReader.Read(0) != 0); + attributeValue.SetToFlag(true); break; case DW_FORM_ref_sig8: value = dataReader.Read(0);