Swap MDCVInfoELF::cv_signature if needed.

BUG=chromium:877888

Change-Id: Ie4437228dfc32619ce5feb1769ba1644a4ea8ca2
Reviewed-on: https://chromium-review.googlesource.com/1192963
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Lei Zhang 2018-08-28 02:00:49 -07:00
parent ee6f67d3b0
commit 54fa71efbe

View file

@ -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<MDCVInfoELF*>(&(*cv_record)[0]);
Swap(&cv_record_elf->cv_signature);
}
}
// If the signature doesn't match something above, it's not something