You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/02/01 22:01:22 UTC

lucy-clownfish git commit: Fix segfault when converting HTML URIs

Repository: lucy-clownfish
Updated Branches:
  refs/heads/master e58046c1c -> 0665f2be2


Fix segfault when converting HTML URIs


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/0665f2be
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/0665f2be
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/0665f2be

Branch: refs/heads/master
Commit: 0665f2be2049a479a9aa8b34d045a323fba982a2
Parents: e58046c
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Feb 1 22:00:43 2015 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Feb 1 22:00:43 2015 +0100

----------------------------------------------------------------------
 compiler/src/CFCCHtml.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/0665f2be/compiler/src/CFCCHtml.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCHtml.c b/compiler/src/CFCCHtml.c
index 542a6ff..dd4af99 100644
--- a/compiler/src/CFCCHtml.c
+++ b/compiler/src/CFCCHtml.c
@@ -776,7 +776,9 @@ S_convert_uris(CFCClass *klass, cmark_node *node) {
     while (CMARK_EVENT_DONE != (ev_type = cmark_iter_next(iter))) {
         cmark_node *cur = cmark_iter_get_node(iter);
 
-        if (cmark_node_get_type(cur) == NODE_LINK) {
+        if (ev_type == CMARK_EVENT_EXIT
+            && cmark_node_get_type(cur) == NODE_LINK
+        ) {
             S_convert_uri(klass, cur);
         }
     }