diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 2 | ||||
-rw-r--r-- | src/buffer.h | 2 |
2 files changed, 2 insertions, 2 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 diff --git a/src/buffer.h b/src/buffer.h index 96b2704..2d3db0d 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -13,7 +13,7 @@ extern "C" { #endif -typedef ssize_t bufsize_t; +typedef int32_t bufsize_t; typedef struct { cmark_mem *mem; |