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:
David Herrmann 2011-05-05 21:17:19 +02:00 committed by Johan Hedberg
parent c70a4afe43
commit 966e12d17a

View File

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