From 11338bdb09094f5bcd01494ac340e47e898f915d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 30 May 2011 22:37:58 -0700 Subject: [PATCH] Revert "Remove 16 byte limit for PIN codes returned by agents" --- src/agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agent.c b/src/agent.c index 40495bfc7..f87f25348 100644 --- a/src/agent.c +++ b/src/agent.c @@ -403,7 +403,7 @@ static void pincode_reply(DBusPendingCall *call, void *user_data) len = strlen(pin); dbus_error_init(&err); - if (len < 1) { + if (len > 16 || len < 1) { error("Invalid PIN length (%zu) from agent", len); dbus_set_error_const(&err, "org.bluez.Error.InvalidArgs", "Invalid passkey length");