]> granicus.if.org Git - multimarkdown/commitdiff
FIXED: Fix potential crash
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Wed, 15 Mar 2017 18:33:33 +0000 (14:33 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Wed, 15 Mar 2017 18:33:33 +0000 (14:33 -0400)
Sources/libMultiMarkdown/writer.c

index 1e882f6dc9b4f361844cade1a389cd85f0d6b74f..2e75fc8262bc53e6a7d99fe7924a4b1895784c4e 100644 (file)
@@ -1304,7 +1304,8 @@ void process_definition_block(mmd_engine * e, token * block) {
                                        break;
                        }
                        label->type = TEXT_EMPTY;
-                       label->next->type = TEXT_EMPTY;
+                       if (label->next)
+                               label->next->type = TEXT_EMPTY;
                        strip_leading_whitespace(label, e->dstr->str);
                        break;
                case BLOCK_DEF_LINK: