1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:04:47 +02:00

Short circuit empty format strings in Anope::Format.

This fixes a bug where Anope would loop infinitely when passed an
empty format string.
This commit is contained in:
Sadie Powell
2026-02-16 00:55:08 +00:00
parent 5b2ab323ab
commit 2f1f04f7cb
+3
View File
@@ -783,6 +783,9 @@ Anope::string Anope::Format(const char *fmt, ...)
Anope::string Anope::Format(va_list &valist, const char *fmt)
{
if (!fmt || !fmt[0])
return "";
static std::vector<char> buffer(512);
while (true)
{