From fbd84fde3a25d23cbf51fe0cd609ce9bd13836cc 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 --- .../main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/java') 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