From: Timo Sirainen Date: Mon, 23 Aug 2010 17:43:17 +0000 (+0100) Subject: liblib: Don't segfault if write is attempted beyond non-dynamic buffer's bounds. X-Git-Tag: 2.0.1~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=96bd662dd0b11b4be42ebfa762f7ca328f37074a;p=thirdparty%2Fdovecot%2Fcore.git liblib: Don't segfault if write is attempted beyond non-dynamic buffer's bounds. --- diff --git a/src/lib/buffer.c b/src/lib/buffer.c index b92837e767..2c93f68040 100644 --- a/src/lib/buffer.c +++ b/src/lib/buffer.c @@ -57,6 +57,7 @@ buffer_check_limits(struct real_buffer *buf, size_t pos, size_t data_size) if (unlikely(!buf->dynamic)) { i_panic("Buffer full (%"PRIuSIZE_T" > %"PRIuSIZE_T", " "pool %s)", pos + data_size, buf->alloc, + buf->pool == NULL ? "" : pool_get_name(buf->pool)); }