summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libril/ril_service.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp
index f67575b..a2bede4 100644
--- a/libril/ril_service.cpp
+++ b/libril/ril_service.cpp
@@ -1394,7 +1394,9 @@ Return<void> RadioImpl::startNetworkScan(int32_t serial, const NetworkScanReques
return Void();
}
// safe to copy to geran_bands because it's a union member
- std::memcpy(&ras_to.bands.geran_bands, bands, ras_to.bands_length * sizeof(uint32_t));
+ for (size_t idx = 0; idx < ras_to.bands_length; ++idx) {
+ ras_to.bands.geran_bands[idx] = (RIL_GeranBands) (*bands)[idx];
+ }
}
CALL_ONREQUEST(RIL_REQUEST_START_NETWORK_SCAN, &scan_request, sizeof(scan_request), pRI,