]> granicus.if.org Git - multimarkdown/commitdiff
FIXED: Fix NULL pointer dereference
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 14 Mar 2017 22:44:41 +0000 (18:44 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 14 Mar 2017 22:44:41 +0000 (18:44 -0400)
Sources/libMultiMarkdown/writer.c

index 69261b3b8b6ea205dd37f8f42e62473b50748ae4..997d578fa4685c7bcadd6dbbc577ceab6578bed1 100644 (file)
@@ -1349,7 +1349,7 @@ token * manual_label_from_header(token * h, const char * source) {
                                break;
                        case PAIR_BRACKET:
                                label = walker;
-                               while(walker->type == PAIR_BRACKET) {
+                               while(walker && walker->type == PAIR_BRACKET) {
                                        walker = walker->prev;
                                        count++;
                                }