summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-01-05 10:38:16 +0200
committerDaniel Stone <daniel@fooishbar.org>2008-01-17 18:43:05 +1100
commitb99a43dfe97c1813e1c61f298b1c83c5d5ca88a2 (patch)
tree1f2ee624708f4e42d82f2a475835cc24cc108e61 /os
parenta6a7fadbb03ee99312dfb15ac478ab3c414c1c0b (diff)
OS: IO: Zero out client buffers
For alignment reasons, we can write out uninitialised bytes, so allocate the whole thing with xcalloc.
Diffstat (limited to 'os')
-rw-r--r--os/io.c2
1 files changed, 1 insertions, 1 deletions
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);