diff --git a/src/processor/disassembler_objdump_unittest.cc b/src/processor/disassembler_objdump_unittest.cc index 781b60ec..4b4ce6c3 100644 --- a/src/processor/disassembler_objdump_unittest.cc +++ b/src/processor/disassembler_objdump_unittest.cc @@ -147,7 +147,7 @@ class TestDumpContext : public DumpContext { TestDumpContext::TestDumpContext(bool x86_64) { if (!x86_64) { MDRawContextX86* raw_context = new MDRawContextX86(); - memset(raw_context, 0, sizeof(raw_context)); + memset(raw_context, 0, sizeof(*raw_context)); raw_context->context_flags = MD_CONTEXT_X86_FULL; @@ -170,7 +170,7 @@ TestDumpContext::TestDumpContext(bool x86_64) { this->valid_ = true; } else { MDRawContextAMD64* raw_context = new MDRawContextAMD64(); - memset(raw_context, 0, sizeof(raw_context)); + memset(raw_context, 0, sizeof(*raw_context)); raw_context->context_flags = MD_CONTEXT_AMD64_FULL; @@ -461,4 +461,4 @@ TEST(DisassemblerObjdumpTest, AMD64CallRegOffset) { ASSERT_FALSE(dis.CalculateSrcAddress(context, src_address)); ASSERT_EQ(dest_address, kAMD64TestRsi + 0x9999999); } -} // namespace google_breakpad \ No newline at end of file +} // namespace google_breakpad