cmark

My personal build of CMark ✏️

Commit
047e65d0b05f601bd0a6fafb4f4eab98659c1529
Parent
c50061bd0359ee1822b08a7c18ee4adf55d6fb1d
Author
John MacFarlane <jgm@berkeley.edu>
Date

commonmark: is_autolink - handle case where link has no children.

Diffstat

1 file changed, 3 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified src/commonmark.c 3 3 0
diff --git a/src/commonmark.c b/src/commonmark.c
@@ -126,6 +126,9 @@ static bool is_autolink(cmark_node *node) {
   }
 
   link_text = node->first_child;
+  if (link_text == NULL) {
+    return false;
+  }
   cmark_consolidate_text_nodes(link_text);
   realurl = (char *)url->data;
   realurllen = url->len;