Index: minidump/minidump_exception_writer_test.cc |
diff --git a/minidump/minidump_exception_writer_test.cc b/minidump/minidump_exception_writer_test.cc |
index 16cff2481402bb957dc6a82d09d2db169e9b8b84..e1cad612f6120905bb49f9852933e9998eeb8137 100644 |
--- a/minidump/minidump_exception_writer_test.cc |
+++ b/minidump/minidump_exception_writer_test.cc |
@@ -44,15 +44,11 @@ void GetExceptionStream(const std::string& file_contents, |
const size_t kFileSize = kContextOffset + sizeof(MinidumpContextX86); |
ASSERT_EQ(file_contents.size(), kFileSize); |
+ const MINIDUMP_DIRECTORY* directory; |
const MINIDUMP_HEADER* header = |
- reinterpret_cast<const MINIDUMP_HEADER*>(&file_contents[0]); |
- |
+ MinidumpHeaderAtStart(file_contents, &directory); |
ASSERT_NO_FATAL_FAILURE(VerifyMinidumpHeader(header, 1, 0)); |
- const MINIDUMP_DIRECTORY* directory = |
- reinterpret_cast<const MINIDUMP_DIRECTORY*>( |
- &file_contents[kDirectoryOffset]); |
- |
ASSERT_EQ(kMinidumpStreamTypeException, directory[0].StreamType); |
ASSERT_GE(directory[0].Location.DataSize, sizeof(MINIDUMP_EXCEPTION_STREAM)); |
ASSERT_EQ(kExceptionStreamOffset, directory[0].Location.Rva); |