From c6535ff3daa4d9d66eb44be7fdedba4da7ef1510 Mon Sep 17 00:00:00 2001 From: Martin Mitas Date: Wed, 10 Jan 2024 21:39:24 +0100 Subject: [PATCH] Fix eof handling in a middle of task list item. --- src/md4c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/md4c.c b/src/md4c.c index c9014f7b..3b1cca2d 100644 --- a/src/md4c.c +++ b/src/md4c.c @@ -6141,7 +6141,7 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end, task_container->is_task = TRUE; task_container->task_mark_off = tmp + 1; off = tmp + 3; - while(ISWHITESPACE(off)) + while(off < ctx->size && ISWHITESPACE(off)) off++; line->beg = off; }