mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 12:38:03 +02:00
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
1 changed files with 1 additions and 1 deletions
2
os/io.c
2
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue