diff --git a/vinagre-history-crash.patch b/vinagre-history-crash.patch new file mode 100644 index 0000000..61b53e3 --- /dev/null +++ b/vinagre-history-crash.patch @@ -0,0 +1,12 @@ +diff -up vinagre-2.28.1/vinagre/vinagre-connect.c.history-crash vinagre-2.28.1/vinagre/vinagre-connect.c +--- vinagre-2.28.1/vinagre/vinagre-connect.c.history-crash 2010-01-04 20:37:20.282194058 -0500 ++++ vinagre-2.28.1/vinagre/vinagre-connect.c 2010-01-04 20:37:29.269077172 -0500 +@@ -203,7 +203,7 @@ saved_history (void) + { + history_from_file = g_strsplit (file_contents, "\n", 0); + len = g_strv_length (history_from_file); +- if (strlen (history_from_file[len-1]) == 0) ++ if (len > 0 && strlen (history_from_file[len-1]) == 0) + { + g_free (history_from_file[len-1]); + history_from_file[len-1] = NULL; diff --git a/vinagre.spec b/vinagre.spec index 08f952d..fd26f00 100644 --- a/vinagre.spec +++ b/vinagre.spec @@ -1,6 +1,6 @@ Name: vinagre Version: 2.29.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: VNC client for GNOME Group: Applications/System @@ -27,6 +27,9 @@ BuildRequires: scrollkeeper # for /usr/share/dbus-1/services Requires: dbus +# https://bugzilla.gnome.org/show_bug.cgi?id=606072 +Patch0: vinagre-history-crash.patch + %description Vinagre is a VNC client for the GNOME desktop. @@ -50,6 +53,7 @@ to vinagre. %prep %setup -q +%patch0 -p1 -b .history-crash %build %configure --enable-avahi=yes --disable-static @@ -157,6 +161,9 @@ fi %changelog +* Mon Jan 4 2010 Matthias Clasen 2.29.1-2 +- Don't crash when the history file is empty (#552076) + * Fri Dec 4 2009 Matthias Clasen 2.29.1-1 - 2.29.1