summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/blocks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blocks.c b/src/blocks.c
index 99dd082..051d2e8 100644
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -580,7 +580,7 @@ static void S_parser_feed(cmark_parser *parser, const unsigned char *buffer,
if (buffer == end)
parser->last_buffer_ended_with_cr = true;
}
- if (*buffer == '\n')
+ if (buffer < end && *buffer == '\n')
buffer++;
}
}