Index: minidump/minidump_thread_writer_test.cc |
diff --git a/minidump/minidump_thread_writer_test.cc b/minidump/minidump_thread_writer_test.cc |
index 15f1a07cb212b57aa110d57414796e3d19912551..fb2baff95060c7ffadd1617e5480ce9c3128bfae 100644 |
--- a/minidump/minidump_thread_writer_test.cc |
+++ b/minidump/minidump_thread_writer_test.cc |
@@ -44,14 +44,11 @@ void GetThreadListStream(const std::string& file_contents, |
ASSERT_GE(file_contents.size(), kThreadsOffset); |
+ 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, kExpectedStreams, 0)); |
- |
- const MINIDUMP_DIRECTORY* directory = |
- reinterpret_cast<const MINIDUMP_DIRECTORY*>( |
- &file_contents[kDirectoryOffset]); |
+ ASSERT_TRUE(directory); |
ASSERT_EQ(kMinidumpStreamTypeThreadList, directory[0].StreamType); |
ASSERT_GE(directory[0].Location.DataSize, sizeof(MINIDUMP_THREAD_LIST)); |