From f824e383c9df00e2cd75cae283ff0f1ff0104c95 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 11 May 2008 16:23:05 +0200 Subject: [PATCH] [markup] Check that str is not NULL Signed-off-by: Julien Danjou --- common/markup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/markup.c b/common/markup.c index ca1bc993b..dbedba9b9 100644 --- a/common/markup.c +++ b/common/markup.c @@ -231,6 +231,9 @@ markup_parse(markup_parser_data_t *data, const char *str, ssize_t slen) }; GError *error = NULL; + if(!a_strlen(str)) + return false; + mkp_ctx = g_markup_parse_context_new(&parser, 0, data, NULL); if(!g_markup_parse_context_parse(mkp_ctx, "", -1, &error)