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

Commit fed081c7 authored by Etan Cohen's avatar Etan Cohen
Browse files

[AWARE] Passphrase limit check used incorrect limit

Passphrase has a lower and upper limit. The uppper limit check
was using the incorrect (lower) limit value.

Bug: 38164425
Test: builds & CtsVerifier test passes
Change-Id: I8a58f46a9558f828f8ccfda07935fcf62285f8c3
parent 74247f83
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1125,7 +1125,7 @@ bool convertHidlNanPublishRequestToLegacy(
      return false;
    }
    if (legacy_request->key_info.body.passphrase_info.passphrase_len
            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
            > NAN_SECURITY_MAX_PASSPHRASE_LEN) {
      LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: passphrase_len too large";
      return false;
    }
@@ -1241,7 +1241,7 @@ bool convertHidlNanSubscribeRequestToLegacy(
      return false;
    }
    if (legacy_request->key_info.body.passphrase_info.passphrase_len
            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
            > NAN_SECURITY_MAX_PASSPHRASE_LEN) {
      LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: passphrase_len too large";
      return false;
    }
@@ -1465,7 +1465,7 @@ bool convertHidlNanDataPathInitiatorRequestToLegacy(
      return false;
    }
    if (legacy_request->key_info.body.passphrase_info.passphrase_len
            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
            > NAN_SECURITY_MAX_PASSPHRASE_LEN) {
      LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: passphrase_len too large";
      return false;
    }
@@ -1529,7 +1529,7 @@ bool convertHidlNanDataPathIndicationResponseToLegacy(
      return false;
    }
    if (legacy_request->key_info.body.passphrase_info.passphrase_len
            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
            > NAN_SECURITY_MAX_PASSPHRASE_LEN) {
      LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: passphrase_len too large";
      return false;
    }