- Output error message instead of assertion failure (#134934)

This commit is contained in:
Miloslav Trmac 2004-10-18 13:01:33 +00:00
parent 405df673c0
commit affbdbdd37
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,18 @@
--- desktop-file-utils-0.9/src/eggdesktopentries.c.nogroup 2004-10-18 14:10:48.527841168 +0200
+++ desktop-file-utils-0.9/src/eggdesktopentries.c 2004-10-18 14:19:33.102093760 +0200
@@ -884,6 +884,15 @@
gchar *key, *value, *key_end, *value_start, *locale;
gsize key_len, value_len;
+ if (entries->current_group->name == NULL)
+ {
+ g_set_error (error, EGG_DESKTOP_ENTRIES_ERROR,
+ EGG_DESKTOP_ENTRIES_ERROR_BAD_START_GROUP,
+ _("desktop entry file does not start with "
+ "legal start group"));
+ return;
+ }
+
key_end = value_start = strchr (line, '=');
g_assert (key_end != NULL);

View File

@ -1,9 +1,10 @@
Summary: Utilities for manipulating .desktop files
Name: desktop-file-utils
Version: 0.9
Release: 1
Release: 2
URL: http://www.freedesktop.org/software/desktop-file-utils
Source0: %{name}-%{version}.tar.gz
Patch0: desktop-file-utils-0.9-nogroup.patch
License: GPL
Group: Development/Tools
BuildRoot: %{_tmppath}/%{name}-root
@ -23,6 +24,7 @@ fixing it up in the process.
%prep
%setup -q
%patch0 -p1 -b .nogroup
%build
@ -46,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/emacs/site-lisp/
%changelog
* Mon Oct 18 2004 Miloslav Trmac <mitr@redhat.com> - 0.9-2
- Output error message instead of assertion failure (#134934)
* Tue Sep 28 2004 Mark McLoughlin <markmc@redhat.com> 0.9-1
- Update to 0.9, remove upstreamed patches