Hello community, here is the log from the commit of package libgweather for openSUSE:Factory checked in at 2015-07-05 17:59:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgweather (Old) and /work/SRC/openSUSE:Factory/.libgweather.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgweather" Changes: -------- --- /work/SRC/openSUSE:Factory/libgweather/libgweather.changes 2015-04-23 07:56:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libgweather.new/libgweather.changes 2015-07-05 17:59:20.000000000 +0200 @@ -1,0 +2,7 @@ +Tue May 12 16:07:13 UTC 2015 - [email protected] + +- Add libgweather-LocationEntry-fix-database.patch: LocationEntry: + fix database matching in the presence of whitespace. Patch from + upstream git. + +------------------------------------------------------------------- New: ---- libgweather-LocationEntry-fix-database.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgweather.spec ++++++ --- /var/tmp/diff_new_pack.dLYsGt/_old 2015-07-05 17:59:21.000000000 +0200 +++ /var/tmp/diff_new_pack.dLYsGt/_new 2015-07-05 17:59:21.000000000 +0200 @@ -25,6 +25,8 @@ Url: http://developer.gnome.org/libgweather/ Source: http://download.gnome.org/sources/libgweather/3.16/%{name}-%{version}.tar.xz Source99: baselibs.conf +# PATCH-FIX-UPSTREAM libgweather-LocationEntry-fix-database.patch [email protected] -- LocationEntry: fix database matching in the presence of whitespace +Patch0: libgweather-LocationEntry-fix-database.patch BuildRequires: gobject-introspection-devel BuildRequires: gtk3-devel >= 3.13.5 BuildRequires: intltool @@ -91,6 +93,7 @@ %lang_package %prep %setup -q +%patch0 -p1 %build %configure \ ++++++ libgweather-LocationEntry-fix-database.patch ++++++ >From d9433617c7cd069d1f29993b34936a6fec843fe7 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna <[email protected]> Date: Thu, 16 Apr 2015 17:45:26 -0700 Subject: LocationEntry: fix database matching in the presence of whitespace Trailing whitespace should prevent prefix matches but not cause matching failures altoghether (trying to call find_word with a length of 0) diff --git a/libgweather/location-entry.c b/libgweather/location-entry.c index d92d9dc..9994ea2 100644 --- a/libgweather/location-entry.c +++ b/libgweather/location-entry.c @@ -679,6 +679,9 @@ match_compare_name (const char *key, const char *name) gboolean is_first_word = TRUE; int len; + /* Ignore whitespace before the string */ + key += strspn (key, " "); + /* All but the last word in KEY must match a full word from NAME, * in order (but possibly skipping some words from NAME). */ @@ -699,7 +702,13 @@ match_compare_name (const char *key, const char *name) } /* The last word in KEY must match a prefix of a following word in NAME */ - return find_word (name, key, strlen (key), FALSE, is_first_word) != NULL; + if (len == 0) { + return TRUE; + } else { + // if we get here, key[len] == 0, so... + g_assert (len == strlen(key)); + return find_word (name, key, len, FALSE, is_first_word) != NULL; + } } static gboolean -- cgit v0.10.2
