summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/perfdata.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/perfdata.cpp b/app/perfdata.cpp
index 98b0132..1305d21 100644
--- a/app/perfdata.cpp
+++ b/app/perfdata.cpp
@@ -561,6 +561,10 @@ QDataStream &operator>>(QDataStream &stream, PerfRecordSample &record)
quint64 contentSize;
stream >> contentSize;
+ if (contentSize > sectionSize)
+ qWarning() << "Truncated stack snapshot" << contentSize << sectionSize;
+ else
+ record.m_userStack.resize(static_cast<int>(contentSize));
}
if (sampleType & PerfEventAttributes::SAMPLE_WEIGHT)