[seahorse] hkp: Make sure algo is initialized
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] hkp: Make sure algo is initialized
- Date: Wed, 24 Feb 2021 22:14:31 +0000 (UTC)
commit 80c2b2c9b2307ba48eea8fb3eb29933720be76f6
Author: Niels De Graef <nielsdegraef gmail com>
Date: Wed Feb 24 23:13:33 2021 +0100
hkp: Make sure algo is initialized
pgp/seahorse-hkp-source.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pgp/seahorse-hkp-source.c b/pgp/seahorse-hkp-source.c
index d54480fe..73f9e09e 100644
--- a/pgp/seahorse-hkp-source.c
+++ b/pgp/seahorse-hkp-source.c
@@ -267,7 +267,7 @@ parse_hkp_index (const char *response)
} else if (g_ascii_strncasecmp (columns[0], "pub", 3) == 0) {
const char *fpr;
g_autofree char *fingerprint = NULL;
- const char *algo;
+ const char *algo = NULL;
g_autoptr (SeahorsePgpSubkey) subkey = NULL;
long created = 0, expired = 0;
g_autoptr(GDateTime) created_date = NULL;
@@ -347,7 +347,8 @@ parse_hkp_index (const char *response)
seahorse_pgp_subkey_set_created (subkey, created_date);
seahorse_pgp_subkey_set_expires (subkey, expired_date);
seahorse_pgp_subkey_set_length (subkey, strtol (columns[3], NULL, 10));
- seahorse_pgp_subkey_set_algorithm (subkey, algo);
+ if (algo)
+ seahorse_pgp_subkey_set_algorithm (subkey, algo);
seahorse_pgp_key_add_subkey (key, subkey);
/* A UID for the key */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]