md_is_named_entity_contents: Fix buffer overflow. Fixes #38.
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 73d26e3..8f9ed19 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -1308,7 +1308,7 @@ md_is_named_entity_contents(MD_CTX* ctx, const CHAR* text, OFF beg, OFF max_end,
{
OFF off = beg;
- if(off <= max_end && ISALPHA_(text[off]))
+ if(off < max_end && ISALPHA_(text[off]))
off++;
else
return FALSE;