diff options
Diffstat (limited to 'chromium/third_party/crashpad/crashpad/util/ios/ios_intermediate_dump_reader.cc')
-rw-r--r-- | chromium/third_party/crashpad/crashpad/util/ios/ios_intermediate_dump_reader.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chromium/third_party/crashpad/crashpad/util/ios/ios_intermediate_dump_reader.cc b/chromium/third_party/crashpad/crashpad/util/ios/ios_intermediate_dump_reader.cc index 022133bce75..d9610f656fc 100644 --- a/chromium/third_party/crashpad/crashpad/util/ios/ios_intermediate_dump_reader.cc +++ b/chromium/third_party/crashpad/crashpad/util/ios/ios_intermediate_dump_reader.cc @@ -70,6 +70,12 @@ bool IOSIntermediateDumpReader::Parse(FileReaderInterface* reader, } while (reader->ReadExactly(&command, sizeof(Command))) { + constexpr int kMaxStackDepth = 10; + if (stack.size() > kMaxStackDepth) { + LOG(ERROR) << "Unexpected depth of intermediate dump data."; + return false; + } + IOSIntermediateDumpObject* parent = stack.top(); switch (command) { case Command::kMapStart: { |