summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2004-03-01 20:05:26 +0000
committerMark McLoughlin <mark@skynet.ie>2004-03-01 20:05:26 +0000
commit0bacbc6e3bbbc008b1dd1997b2382538f84670e5 (patch)
tree36bf50f940391c84999446cb648008a8dcb6e44d
parent9716fcd495f7a5876129f41e5bc860dc22d536a0 (diff)
2004-03-01 Mark McLoughlin <mark@skynet.ie> * configure.in: Version 0.5. 2004-03-01 Mark McLoughlin <mark@skynet.ie> Patch from Dan Williams to not segfault with .desktop files with comments at the start. * src/validate.c: (enum_sections), (enum_actions): Don't crap out if the section or action name is NULL.
-rw-r--r--ChangeLog13
-rw-r--r--configure.in2
-rw-r--r--src/validate.c12
3 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4770232..51cd57c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-03-01 Mark McLoughlin <mark@skynet.ie>
+
+ * configure.in: Version 0.5.
+
+2004-03-01 Mark McLoughlin <mark@skynet.ie>
+
+ Patch from Dan Williams to not segfault with .desktop
+ files with comments at the start.
+
+ * src/validate.c: (enum_sections), (enum_actions):
+ Don't crap out if the section or action name is
+ NULL.
+
2004-02-19 Mark McLoughlin <mark@skynet.ie>
* configure.in: Version 0.4
diff --git a/configure.in b/configure.in
index 7884e00..d340091 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ AC_INIT(src/desktop_file.h)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(desktop-file-utils, 0.4)
+AM_INIT_AUTOMAKE(desktop-file-utils, 0.5)
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
diff --git a/src/validate.c b/src/validate.c
index 3f22444..83bca09 100644
--- a/src/validate.c
+++ b/src/validate.c
@@ -514,7 +514,11 @@ enum_sections (GnomeDesktopFile *df,
{
struct SectionData *section = data;
- g_assert (name != NULL);
+ /* Initial sections (for any comments at top of
+ * file, etc) have name == NULL.
+ */
+ if (!name)
+ return;
if (strcmp (name, "Desktop Entry") == 0 ||
strcmp (name, "KDE Desktop Entry") == 0)
@@ -633,7 +637,11 @@ enum_actions (GnomeDesktopFile *df,
const char *val;
const char *action;
- g_assert (section != NULL);
+ /* Initial sections (for any comments at top of
+ * file, etc) have name == NULL.
+ */
+ if (!section)
+ return;
if (strncmp (section, "Desktop Action ", 15) != 0)
return;