Fix asan/msan bug

PiperOrigin-RevId: 780237506
This commit is contained in:
Guogang Li
2025-07-07 13:30:50 -07:00
committed by Copybara-Service
parent 6a5d39eb59
commit a2bcb2db27
15 changed files with 25 additions and 24 deletions
@@ -137,7 +137,7 @@ BlePacket::BlePacket(const ByteArray& ble_packet_bytes) {
}
ByteArray packet_bytes(ble_packet_bytes);
StreamReader stream_reader{packet_bytes};
StreamReader stream_reader{&packet_bytes};
// The first 3 bytes are supposed to be the service_id_hash.
auto service_id_hash_bytes = stream_reader.ReadBytes(kServiceIdHashLength);
if (!service_id_hash_bytes.has_value()) {