seahorse r2871 - in trunk: . src
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: seahorse r2871 - in trunk: . src
- Date: Sun, 1 Mar 2009 22:23:40 +0000 (UTC)
Author: nnielsen
Date: Sun Mar 1 22:23:40 2009
New Revision: 2871
URL: http://svn.gnome.org/viewvc/seahorse?rev=2871&view=rev
Log:
Match key identifiers where the server returned a short one, but we're
searching for a longer key identifier.
See bug #568799
Modified:
trunk/ChangeLog
trunk/src/seahorse-keyserver-results.c
Modified: trunk/src/seahorse-keyserver-results.c
==============================================================================
--- trunk/src/seahorse-keyserver-results.c (original)
+++ trunk/src/seahorse-keyserver-results.c Sun Mar 1 22:23:40 2009
@@ -60,6 +60,7 @@
const gchar *match;
gboolean ret = FALSE;
gchar* value;
+ gsize n_value, n_match;
g_return_val_if_fail (SEAHORSE_IS_KEYSERVER_RESULTS (self), FALSE);
g_return_val_if_fail (SEAHORSE_IS_OBJECT (obj), FALSE);
@@ -80,7 +81,14 @@
if (strncmp (match, "0x", 2) == 0)
match += 2;
value = g_utf8_casefold (seahorse_object_get_identifier (obj), -1);
+
+ /* Only compare as many bytes as exist in the key id */
+ n_value = strlen (value);
+ n_match = strlen (match);
+ if (n_value > n_match)
+ match += (n_value - n_match);
ret = strstr (value, match) != NULL;
+
g_free (value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]