From 86c766d25c85efbe8efb1dd728783bd1080b7e23 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 05 Nov 2017 16:07:36 -0500 Subject: mq_html_document*(): Don't dereference styles pointer if NULL --- diff --git a/src/utils/html.c b/src/utils/html.c index 936ba05..95d7cdc 100644 --- a/src/utils/html.c +++ b/src/utils/html.c @@ -210,7 +210,9 @@ mq_html_document(const gchar *title, const gchar *styles, len += strlen(title); len += strlen("\n\n"); if (head_tags) { len += strlen(head_tags); @@ -233,7 +235,9 @@ mq_html_document(const gchar *title, const gchar *styles, ptr = g_stpcpy(ptr, title); ptr = g_stpcpy(ptr, "\n\n"); if (head_tags) { ptr = g_stpcpy(ptr, head_tags); @@ -266,7 +270,9 @@ mq_html_document_v(const gchar *title, const gchar *styles, len += strlen(title); len += strlen("\n\n"); if (head_tags) { len += strlen(head_tags); @@ -287,7 +293,9 @@ mq_html_document_v(const gchar *title, const gchar *styles, ptr = g_stpcpy(ptr, title); ptr = g_stpcpy(ptr, "\n\n"); if (head_tags) { ptr = g_stpcpy(ptr, head_tags); -- cgit v0.9.1