--- seahorse-3.14.0/libseahorse/seahorse-key-manager-store.c.~1~	2015-02-14 03:27:33.097043283 +0300
+++ seahorse-3.14.0/libseahorse/seahorse-key-manager-store.c	2015-02-14 03:28:42.621600664 +0300
@@ -269,6 +269,7 @@
 {
 	GdkWindow *source_window;
 	char *ret;
+	gint len;
 
 	g_return_val_if_fail (context != NULL, NULL);
 
@@ -278,9 +279,11 @@
 	if (gdk_property_get (source_window,
 	                      XDS_ATOM, TEXT_ATOM,
 	                      0, MAX_XDS_ATOM_VAL_LEN,
-	                      FALSE, NULL, NULL, NULL,
-	                      (unsigned char **) &ret))
+	                      FALSE, NULL, NULL, &len,
+	                      (unsigned char **) &ret)) {
+		ret[len]='\0';
 		return ret;
+	}
 
 	return NULL;
 }
