From 9c280720bd7709b1d8fa08f11c8e6e02df414efa Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Sat, 18 Mar 2017 09:54:46 -0400 Subject: [PATCH] FIXED: Fix bug in printing NULL strings --- Sources/libMultiMarkdown/html.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Sources/libMultiMarkdown/html.c b/Sources/libMultiMarkdown/html.c index 62b4f57..75d69ea 100644 --- a/Sources/libMultiMarkdown/html.c +++ b/Sources/libMultiMarkdown/html.c @@ -106,9 +106,11 @@ void mmd_print_char_html(DString * out, char c, bool obfuscate) { void mmd_print_string_html(DString * out, const char * str, bool obfuscate) { - while (*str != '\0') { - mmd_print_char_html(out, *str, obfuscate); - str++; + if (str) { + while (*str != '\0') { + mmd_print_char_html(out, *str, obfuscate); + str++; + } } } -- 2.50.1