From b99a43dfe97c1813e1c61f298b1c83c5d5ca88a2 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 5 Jan 2008 10:38:16 +0200 Subject: [PATCH] OS: IO: Zero out client buffers For alignment reasons, we can write out uninitialised bytes, so allocate the whole thing with xcalloc. --- os/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/io.c b/os/io.c index 968f40a54..be89021e5 100644 --- a/os/io.c +++ b/os/io.c @@ -1196,7 +1196,7 @@ AllocateOutputBuffer(void) oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput)); if (!oco) return (ConnectionOutputPtr)NULL; - oco->buf = (unsigned char *) xalloc(BUFSIZE); + oco->buf = (unsigned char *) xcalloc(1, BUFSIZE); if (!oco->buf) { xfree(oco);