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:
parent
a6a7fadbb0
commit
b99a43dfe9
2
os/io.c
2
os/io.c
|
@ -1196,7 +1196,7 @@ AllocateOutputBuffer(void)
|
||||||
oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput));
|
oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput));
|
||||||
if (!oco)
|
if (!oco)
|
||||||
return (ConnectionOutputPtr)NULL;
|
return (ConnectionOutputPtr)NULL;
|
||||||
oco->buf = (unsigned char *) xalloc(BUFSIZE);
|
oco->buf = (unsigned char *) xcalloc(1, BUFSIZE);
|
||||||
if (!oco->buf)
|
if (!oco->buf)
|
||||||
{
|
{
|
||||||
xfree(oco);
|
xfree(oco);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user