| Index: chrome/browser/metrics/antivirus_metrics_provider_win.cc
|
| diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win.cc b/chrome/browser/metrics/antivirus_metrics_provider_win.cc
|
| index 47681b2f7941e5f81e9af4e5967065b5ce01d86a..4677fab505068fdeccf6855d96ff67aec79932cd 100644
|
| --- a/chrome/browser/metrics/antivirus_metrics_provider_win.cc
|
| +++ b/chrome/browser/metrics/antivirus_metrics_provider_win.cc
|
| @@ -397,8 +397,12 @@ AntiVirusMetricsProvider::FillAntiVirusProductsFromWMI(
|
| return RESULT_FAILED_TO_GET_PRODUCT_STATE;
|
|
|
| LONG state_val = V_I4(product_state.ptr());
|
| - // Map the values from product_state to the proto values.
|
| - switch (reinterpret_cast<PRODUCT_STATE*>(&state_val)->security_state) {
|
| + PRODUCT_STATE product_state_struct;
|
| + std::copy(reinterpret_cast<const char*>(&state_val),
|
| + reinterpret_cast<const char*>(&state_val) + sizeof state_val,
|
| + reinterpret_cast<char*>(&product_state_struct));
|
| + // Map the values from product_state_struct to the proto values.
|
| + switch (product_state_struct.security_state) {
|
| case 0:
|
| av_product.set_product_state(
|
| metrics::SystemProfileProto::AntiVirusState::
|
|
|