Fix ExploitabilityLinuxUtilsTest::DisassembleBytesTest to not fail when temp file ends with 0
R=ivanpe@chromium.org BUG=https://bugs.chromium.org/p/google-breakpad/issues/detail?id=668 Review URL: https://codereview.chromium.org/1482363003 .
This commit is contained in:
parent
a22992081f
commit
524508ff2f
1 changed files with 3 additions and 1 deletions
|
@ -194,8 +194,10 @@ TEST(ExploitabilityLinuxUtilsTest, DisassembleBytesTest) {
|
|||
std::stringstream objdump_stream;
|
||||
objdump_stream.str(string(buffer));
|
||||
string line = "";
|
||||
while ((line.find("0:") == string::npos) && getline(objdump_stream, line)) {
|
||||
while ((line.find("<.data>") == string::npos) &&
|
||||
getline(objdump_stream, line)) {
|
||||
}
|
||||
ASSERT_TRUE(getline(objdump_stream, line));
|
||||
ASSERT_EQ(line, " 0:\tc7 00 05 00 00 00 \tmov DWORD PTR [rax],0x5");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue