summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/blocks.c1
-rw-r--r--src/chunk.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/blocks.c b/src/blocks.c
index de47dfb..99dd082 100644
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -1157,6 +1157,7 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer,
input.data = parser->curline.ptr;
input.len = parser->curline.size;
+ input.alloc = 0;
parser->line_number++;
diff --git a/src/chunk.h b/src/chunk.h
index 666484c..f198be3 100644
--- a/src/chunk.h
+++ b/src/chunk.h
@@ -37,6 +37,8 @@ static CMARK_INLINE void cmark_chunk_ltrim(cmark_chunk *c) {
}
static CMARK_INLINE void cmark_chunk_rtrim(cmark_chunk *c) {
+ assert(!c->alloc);
+
while (c->len > 0) {
if (!cmark_isspace(c->data[c->len - 1]))
break;