[seahorse] pgp-key-properties: Be paranoid; don't overwrite fingerprint characters



commit 1c9e4761ee7d08f6f31aac525e97b1b794a5c9b9
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Apr 9 17:30:50 2014 -0500

    pgp-key-properties: Be paranoid; don't overwrite fingerprint characters
    
    The code assumes that a long fingerprint can be split into two lines by replacing
    (presumably) a space with a newline.  Ensure that *that* character is actually
    whitespace.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719872

 pgp/seahorse-pgp-key-properties.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pgp/seahorse-pgp-key-properties.c b/pgp/seahorse-pgp-key-properties.c
index 30c9608..c0e1616 100644
--- a/pgp/seahorse-pgp-key-properties.c
+++ b/pgp/seahorse-pgp-key-properties.c
@@ -1349,7 +1349,7 @@ do_details (SeahorseWidget *swidget)
     widget = GTK_WIDGET (gtk_builder_get_object (swidget->gtkbuilder, "details-fingerprint-label"));
     if (widget) {
         fp_label = g_strdup (seahorse_pgp_key_get_fingerprint (pkey)); 
-        if (strlen (fp_label) > 24)
+        if (strlen (fp_label) > 24 && g_ascii_isspace (fp_label[24]))
             fp_label[24] = '\n';
         gtk_label_set_text (GTK_LABEL (widget), fp_label);
         g_free (fp_label);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]