summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index b879f0c..12cbc56 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -41,7 +41,7 @@ void cmark_strbuf_grow(cmark_strbuf *buf, bufsize_t target_size) {
if (target_size < buf->asize)
return;
- if (target_size > (bufsize_t)(SIZE_MAX / 4))
+ if (target_size > (bufsize_t)(INT32_MAX / 2))
abort();
/* Oversize the buffer by 50% to guarantee amortized linear time