From eab3f701a845b568b1a95ad3739a3590f2669b82 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 24 May 2025 10:18:15 +0200 Subject: [PATCH] Fix displayed size in case of overflow computation --- m-string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-string.h b/m-string.h index 03e7efe0..a72f0b57 100644 --- a/m-string.h +++ b/m-string.h @@ -382,7 +382,7 @@ M_P(char *, m_str1ng, _fit2size, m_string_t v, size_t size_alloc) alloc = m_str1ng_round_capacity(&m, &e, (m_str1ng_size_t) alloc); if (M_UNLIKELY_NOMEM (alloc <= size_alloc)) { /* Overflow in alloc computation */ - M_MEMORY_FULL(char, alloc); + M_MEMORY_FULL(char, size_alloc); } char *ptr = m_str1ng_embedded_p(v) ? NULL : v->u.heap.ptr; //FIXME: old_alloc may not be NULL if ptr is NULL.