From 54fa71efbe50fb2b58096d871575b59e12edba6d Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 28 Aug 2018 02:00:49 -0700 Subject: [PATCH] Swap MDCVInfoELF::cv_signature if needed. BUG=chromium:877888 Change-Id: Ie4437228dfc32619ce5feb1769ba1644a4ea8ca2 Reviewed-on: https://chromium-review.googlesource.com/1192963 Reviewed-by: Joshua Peraza --- src/processor/minidump.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index d8a45dc2..afc5f038 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -2399,7 +2399,11 @@ const uint8_t* MinidumpModule::GetCVRecord(uint32_t* size) { module_.cv_record.data_size; return NULL; } - // There's nothing to swap in CVInfoELF, it's just raw bytes. + if (minidump_->swap()) { + MDCVInfoELF* cv_record_elf = + reinterpret_cast(&(*cv_record)[0]); + Swap(&cv_record_elf->cv_signature); + } } // If the signature doesn't match something above, it's not something