From 30b0bbd4a287994e0e4816483eb410115f781e39 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Thu, 11 Jun 2020 21:07:27 -0700 Subject: [PATCH] adb: avoid crash when authenticating without vendor keys. Bug: http://b/158232136 Test: manual Change-Id: Ic8211335494a6acb703af5b82f52856223f538bb --- adb/transport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adb/transport.cpp b/adb/transport.cpp index b6b6984a5..c33d5afcb 100644 --- a/adb/transport.cpp +++ b/adb/transport.cpp @@ -1533,8 +1533,7 @@ std::shared_ptr atransport::NextKey() { keys_.pop_front(); } - std::shared_ptr result = keys_[0]; - return result; + return Key(); } void atransport::ResetKeys() {