TemporaryExposureKey: safely initialize with null data

This commit is contained in:
Christian Grigis 2020-09-18 14:33:54 +02:00 committed by Marvin W
parent 832ee232ea
commit 98d1f54e54

View File

@ -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;