Fixed opening minidump on Windows in MinidumpTest.TestMinidumpFromStream

Minidump file needs to be opened as binary.

Change-Id: I15f148ec905c9491050b77a77e86e2749da93515
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/5160989
Reviewed-by: Sterling Augustine <saugustine@google.com>
This commit is contained in:
Nathan Moinvaziri 2024-01-02 13:19:30 -08:00 committed by Ivan Penkov
parent 898a997855
commit 8e125760dc

View file

@ -111,7 +111,7 @@ TEST_F(MinidumpTest, TestMinidumpFromFile) {
TEST_F(MinidumpTest, TestMinidumpFromStream) {
// read minidump contents into memory, construct a stringstream around them
ifstream file_stream(minidump_file_.c_str(), std::ios::in);
ifstream file_stream(minidump_file_.c_str(), std::ios::in | std::ios::binary);
ASSERT_TRUE(file_stream.good());
vector<char> bytes;
file_stream.seekg(0, std::ios_base::end);