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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user