Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7664bcee authored by Thecrazyskull's avatar Thecrazyskull
Browse files

KeySetManagerService: prevent NPE

* If pubKeys is null, we cannot check the size of pubKeys

Test: none

Change-Id: I3b4074d8727b084fea98a0e0a5a0afbd96bea41d
parent 2c1e3963
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ public class KeySetManagerService {
        for (int i = 0; i < defMapSize; i++) {
            String alias = definedMapping.keyAt(i);
            ArraySet<PublicKey> pubKeys = definedMapping.valueAt(i);
            if (alias != null && pubKeys != null || pubKeys.size() > 0) {
            if (alias != null && pubKeys != null && pubKeys.size() > 0) {
                KeySetHandle ks = addKeySetLPw(pubKeys);
                newKeySetAliases.put(alias, ks.getId());
            }