From: Fletcher T. Penney Date: Tue, 14 Mar 2017 18:56:44 +0000 (-0400) Subject: FIXED: Fix bug in Aho-Corasick implementation X-Git-Tag: 6.0.0-rc1^2~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5cd846fe7540b30ceba1084d422294f2156f19a2;p=multimarkdown FIXED: Fix bug in Aho-Corasick implementation --- diff --git a/Sources/libMultiMarkdown/aho-corasick.c b/Sources/libMultiMarkdown/aho-corasick.c index f94bd60..60c057e 100644 --- a/Sources/libMultiMarkdown/aho-corasick.c +++ b/Sources/libMultiMarkdown/aho-corasick.c @@ -373,13 +373,13 @@ match * ac_trie_search(trie * a, const char * source, size_t start, size_t len) size_t temp_state; // Character being compared - int test_value; + unsigned char test_value; size_t counter = start; size_t stop = start + len; while ((counter < stop) && (source[counter] != '\0')) { // Read next character - test_value = (int)source[counter++]; + test_value = (unsigned char)source[counter++]; // Check for path that allows us to match next character while (state != 0 && a->node[state].child[test_value] == 0) {