OS: IO: Zero out client buffers

For alignment reasons, we can write out uninitialised bytes, so allocate
the whole thing with xcalloc.
This commit is contained in:
Daniel Stone 2008-01-05 10:38:16 +02:00
parent a6a7fadbb0
commit b99a43dfe9

View File

@ -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);