diff -Nur -x '*.orig' -x '*~' seahorse-plugins-2.28.1/agent/seahorse-agent-io.c seahorse-plugins-2.28.1.new/agent/seahorse-agent-io.c
--- seahorse-plugins-2.28.1/agent/seahorse-agent-io.c	2009-10-04 23:11:19.000000000 +0200
+++ seahorse-plugins-2.28.1.new/agent/seahorse-agent-io.c	2009-12-13 21:55:57.000000000 +0100
@@ -69,7 +69,7 @@
 static gint g_socket = -1;              /* Socket we're listening on */
 static GIOChannel *g_iochannel = NULL;  /* IO channel for above */
 static gint g_iochannel_tag = 0;        /* Event source tag for above */
-static char g_socket_name[MAXPATHLEN];  /* Name of socket we're listening on */
+static char *g_socket_name;  /* Name of socket we're listening on */
 
 struct _SeahorseAgentConn {
     gint stag;                  /* glib source tag */
@@ -138,9 +138,8 @@
     g_assert (g_socket == -1);
 
     /* We build put the socket in a directory called /tmp/seahorse-XXXXXX */
-    t = g_build_filename (g_get_tmp_dir (), SOCKET_DIR, NULL);
-    strncpy (g_socket_name, t, KL (g_socket_name));
-    g_free (t);
+    g_free (g_socket_name);
+    g_socket_name = g_build_filename (g_get_tmp_dir (), SOCKET_DIR, NULL);
 
     /* Make the appropriate directory */
     if (!mkdtemp (g_socket_name)) {
@@ -154,8 +153,9 @@
         g_warning ("couldn't set permissions on directory: %s", strerror (errno));
 
     /* Build the socket name */
-    strncat (g_socket_name, SOCKET_FILE, KL (g_socket_name));
-    g_socket_name[KL (g_socket_name)] = 0;
+    t = g_socket_name;
+    g_socket_name = g_strdup_printf ("%s%s", g_socket_name, SOCKET_FILE);
+    g_free (t);
 
     memset (&addr, 0, sizeof (addr));
     addr.sun_family = AF_UNIX;
@@ -810,16 +810,19 @@
 
         g_clear_error (&err);
 
-        /* Remove the socket */
-        unlink (g_socket_name);
+        if (g_socket_name) {
+            /* Remove the socket */
+            unlink (g_socket_name);
 
-        /* Remove the directory */
-        t = strrchr (g_socket_name, '/');
-        if (t != NULL) {
-            *t = 0;
-            rmdir (g_socket_name);
-        }
+            /* Remove the directory */
+            t = strrchr (g_socket_name, '/');
+            if (t != NULL) {
+                *t = 0;
+                rmdir (g_socket_name);
+            }
 
-        g_socket_name[0] = 0;
+            g_free (g_socket_name);
+            g_socket_name = NULL;
+        }
     }    
 }
diff -Nur -x '*.orig' -x '*~' seahorse-plugins-2.28.1/libseahorse/seahorse-gpg-options.c seahorse-plugins-2.28.1.new/libseahorse/seahorse-gpg-options.c
--- seahorse-plugins-2.28.1/libseahorse/seahorse-gpg-options.c	2009-08-04 16:26:43.000000000 +0200
+++ seahorse-plugins-2.28.1.new/libseahorse/seahorse-gpg-options.c	2009-12-13 21:50:34.000000000 +0100
@@ -41,7 +41,7 @@
 #define  GPG_VERSION_PREFIX1   "1."
 #define  GPG_VERSION_PREFIX2   "2."
 
-static gchar gpg_homedir[MAXPATHLEN];
+static gchar *gpg_homedir;
 static gboolean gpg_options_inited = FALSE;
 
 static gboolean
@@ -75,6 +75,9 @@
     g_assert (gpg_options_inited);
     g_assert (!err || !*err);
 
+    if (!gpg_homedir)
+        return NULL;
+
     /* Check for and open ~/.gnupg/gpg.conf */
     conf = g_strconcat (gpg_homedir, "/gpg.conf", NULL);
     if (g_file_test (conf, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_EXISTS)) 
@@ -206,16 +209,14 @@
                     *x = 0;
                     g_strstrip (t);
 
-                    gpg_homedir[0] = 0;
+                    g_free (gpg_homedir);
 
                     /* If it's not a rooted path then expand */
                     if (t[0] == '~') {
-                        g_strlcpy (gpg_homedir, g_get_home_dir (),
-                                   sizeof (gpg_homedir));
-                        t++;
+                        gpg_homedir = g_strconcat (g_get_home_dir(), ++t);
+                    } else {
+                        gpg_homedir = g_strdup (t);
                     }
-
-                    g_strlcat (gpg_homedir, t, sizeof (gpg_homedir));
                     found = TRUE;
                 }
             }
