Index: minidump/minidump_misc_info_writer_test.cc |
diff --git a/minidump/minidump_misc_info_writer_test.cc b/minidump/minidump_misc_info_writer_test.cc |
index 8b3f9546a89d2c76611a41e5cf39be22e0731f96..5960685bb360c29fa99813a73e8e2052226d33d0 100644 |
--- a/minidump/minidump_misc_info_writer_test.cc |
+++ b/minidump/minidump_misc_info_writer_test.cc |
@@ -42,18 +42,15 @@ void GetMiscInfoStream(const std::string& file_contents, const T** misc_info) { |
ASSERT_EQ(kFileSize, file_contents.size()); |
+ 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)); |
+ ASSERT_TRUE(directory); |
- const MINIDUMP_DIRECTORY* directory = |
- reinterpret_cast<const MINIDUMP_DIRECTORY*>( |
- &file_contents[kDirectoryOffset]); |
- |
- ASSERT_EQ(kMinidumpStreamTypeMiscInfo, directory->StreamType); |
- ASSERT_EQ(kMiscInfoStreamSize, directory->Location.DataSize); |
- ASSERT_EQ(kMiscInfoStreamOffset, directory->Location.Rva); |
+ ASSERT_EQ(kMinidumpStreamTypeMiscInfo, directory[0].StreamType); |
+ ASSERT_EQ(kMiscInfoStreamSize, directory[0].Location.DataSize); |
+ ASSERT_EQ(kMiscInfoStreamOffset, directory[0].Location.Rva); |
*misc_info = |
reinterpret_cast<const T*>(&file_contents[kMiscInfoStreamOffset]); |