From dc3fcbdc8e8a81f48be6f33b5eb1cb54b8ef56a0 Mon Sep 17 00:00:00 2001 From: Fabian Henneke Date: Thu, 23 Jul 2020 13:54:53 +0200 Subject: Fix a crash when parsing long key IDs (#959) Co-authored-by: Harsh Shandilya (cherry picked from commit fbd84fde3a25d23cbf51fe0cd609ce9bd13836cc) --- .../main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt index 6cacf4b9..ee57acf8 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt @@ -257,8 +257,8 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB it.matches("[a-fA-F0-9]{16}".toRegex()) } if (maybeLongKeyId != null) { - val keyId = maybeLongKeyId.toULong() - return GpgIdentifier.KeyId(maybeLongKeyId.toLong()) + val keyId = maybeLongKeyId.toULong(16) + return GpgIdentifier.KeyId(keyId.toLong()) } // Match fingerprints: -- cgit v1.2.3