mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-26 05:34:23 +08:00
Remove 16 byte limit for PIN codes returned by agents
Agents can now return PIN codes longer than 16 characters. The pin parser automatically truncates all PINs to 16 characters, but allows hexadecimal PINs to be longer than 16 characters because each two hexdecimal encoded bytes are parsed into one output byte.
This commit is contained in:
parent
c70a4afe43
commit
966e12d17a
@ -403,7 +403,7 @@ static void pincode_reply(DBusPendingCall *call, void *user_data)
|
||||
len = strlen(pin);
|
||||
|
||||
dbus_error_init(&err);
|
||||
if (len > 16 || len < 1) {
|
||||
if (len < 1) {
|
||||
error("Invalid PIN length (%zu) from agent", len);
|
||||
dbus_set_error_const(&err, "org.bluez.Error.InvalidArgs",
|
||||
"Invalid passkey length");
|
||||
|
Loading…
Reference in New Issue
Block a user