summaryrefslogtreecommitdiff
path: root/wifi/1.0/default/hidl_struct_util.cpp
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2017-05-09 11:44:38 -0700
committerEtan Cohen <etancohen@google.com>2017-05-09 12:15:08 -0700
commitfed081c7a57c72f873d769ccb697a18acc2b917f (patch)
tree75bd048c8dc7618f63c5a6e9bf78c13585e5698e /wifi/1.0/default/hidl_struct_util.cpp
parent74247f83da148049583e14e5e3b42c39f08ea653 (diff)
[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
Diffstat (limited to 'wifi/1.0/default/hidl_struct_util.cpp')
-rw-r--r--wifi/1.0/default/hidl_struct_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 661cd785a1..c9617f5947 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -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;
}