From: Fletcher T. Penney Date: Thu, 7 Sep 2017 15:35:38 +0000 (-0400) Subject: FIXED: Fix potential dereference in table handling X-Git-Tag: 6.2.2^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=efbe9a48a6e039e03d5c335d042af186b615f169;p=multimarkdown FIXED: Fix potential dereference in table handling --- diff --git a/Sources/libMultiMarkdown/writer.c b/Sources/libMultiMarkdown/writer.c index da9e8e5..ed0bbf7 100644 --- a/Sources/libMultiMarkdown/writer.c +++ b/Sources/libMultiMarkdown/writer.c @@ -2354,6 +2354,13 @@ void abbreviation_from_bracket(const char * source, scratch_pad * scratch, token void read_table_column_alignments(const char * source, token * table, scratch_pad * scratch) { token * walker = table->child->child; + scratch->table_alignment[0] = '\0'; + scratch->table_column_count = 0; + + if (walker == NULL) { + return; + } + // Find the separator line while (walker->next) { walker = walker->next;