0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-03-14 05:20:17 +01:00

ircd::logger: Appease the array-bounds bean counter.

This commit is contained in:
Jason Volk 2023-01-15 18:08:14 -08:00
parent feb7524fe0
commit 310053abcf

View file

@ -559,7 +559,7 @@ noexcept
// Compose the prefix sequence into the buffer.
std::stringstream s;
pubsetbuf(s, buf);
pubsetbuf(s, mutable_buffer(buf, max));
s
<< microdate(date)
<< ' '
@ -595,6 +595,7 @@ noexcept
// Compose the newline after user message.
size_t len{pos + sb.consumed()};
assert(len + 2 <= sizeof(buf));
len = std::min(len, max);
buf[len++] = '\r';
buf[len++] = '\n';