From 51403f65be4bd95821d3b54a071a1eef5c1db030 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 30 Apr 2013 18:26:57 +0100 Subject: [PATCH] basexmlformatter: Do not allow empty file loading --- ges/ges-base-xml-formatter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ges/ges-base-xml-formatter.c b/ges/ges-base-xml-formatter.c index 94daeb115d..12d2ff0d8d 100644 --- a/ges/ges-base-xml-formatter.c +++ b/ges/ges-base-xml-formatter.c @@ -142,6 +142,9 @@ create_parser_context (GESBaseXmlFormatter * self, const gchar * uri, if (!g_file_load_contents (file, NULL, &xmlcontent, &xmlsize, NULL, &err)) goto failed; + if (g_strcmp0 (xmlcontent, "") == 0) + goto failed; + parsecontext = g_markup_parse_context_new (&self_class->content_parser, G_MARKUP_TREAT_CDATA_AS_TEXT, self, NULL);