]> granicus.if.org Git - multimarkdown/commitdiff
FIXED: Fix potential crash in definitions
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 18 Mar 2017 12:32:51 +0000 (08:32 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 18 Mar 2017 12:32:51 +0000 (08:32 -0400)
Sources/libMultiMarkdown/html.c

index 1e54f6ced98d014d51b2399cee825956df25b798..62b4f578fc4bf7b41110d0b6796cc87b01e4d8b1 100644 (file)
@@ -409,10 +409,13 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
                        print_const("<dd>");
 
                        temp_short = scratch->list_is_tight;
-                       if (!(t->child->next && (t->child->next->type == BLOCK_EMPTY) && t->child->next->next))
-                               scratch->list_is_tight = true;
+                       if (t->child) {
+                               if (!(t->child->next && (t->child->next->type == BLOCK_EMPTY) && t->child->next->next))
+                                       scratch->list_is_tight = true;
+
+                               mmd_export_token_tree_html(out, source, t->child, scratch);
+                       }
 
-                       mmd_export_token_tree_html(out, source, t->child, scratch);
                        print_const("</dd>");
                        scratch->padded = 0;