From 98d1f54e542a219ebe9478d6444264059172cd10 Mon Sep 17 00:00:00 2001 From: Christian Grigis Date: Fri, 18 Sep 2020 14:33:54 +0200 Subject: [PATCH] TemporaryExposureKey: safely initialize with null data --- .../gms/nearby/exposurenotification/TemporaryExposureKey.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/TemporaryExposureKey.java b/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/TemporaryExposureKey.java index 96243d30..15f02f4d 100644 --- a/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/TemporaryExposureKey.java +++ b/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/TemporaryExposureKey.java @@ -27,7 +27,7 @@ public class TemporaryExposureKey extends AutoSafeParcelable { } TemporaryExposureKey(byte[] keyData, int rollingStartIntervalNumber, @RiskLevel int transmissionRiskLevel, int rollingPeriod) { - this.keyData = keyData; + this.keyData = (keyData == null ? new byte[0] : keyData); this.rollingStartIntervalNumber = rollingStartIntervalNumber; this.transmissionRiskLevel = transmissionRiskLevel; this.rollingPeriod = rollingPeriod;