1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 17:33:13 +02:00

Memory isn't initialized to zero by dbuf_queue_init(), causing

dbuf->length to be unitialized.
This wasn't an actual problem until yesterday in UnrealIRCd code,
since the whole client struct was initialized to zero, including
client->local->sendQ(->length) etc.
However, now we use the dbuf code elsewhere too (on the stack) and
3rd party modules can use it too, so fix this bug.
This commit is contained in:
Bram Matthys
2022-01-03 08:59:14 +01:00
parent 75a2fde672
commit a4af100ca8
+1
View File
@@ -58,6 +58,7 @@ static void dbuf_free(dbufbuf *ptr)
void dbuf_queue_init(dbuf *dyn)
{
memset(dyn, 0, sizeof(dbuf));
INIT_LIST_HEAD(&dyn->dbuf_list);
}