diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-09 19:12:44 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-07-09 22:52:30 -0700 |
commit | bed610fcae41ddfe21fa9acde599b17d1d15f5d1 (patch) | |
tree | d52d091b68dcbc4c4d0d6b2004c4e79ab4fc0176 /os | |
parent | 1622dd8ab24d2fe7b9908110eb237774d4e03568 (diff) |
Set padding bytes to 0 in WriteToClient
Clear them out when needed instead of leaving whatever values were
present in previously sent messages.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'os')
-rw-r--r-- | os/io.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -815,7 +815,11 @@ WriteToClient(ClientPtr who, int count, const void *__buf) NewOutputPending = TRUE; FD_SET(oc->fd, &OutputPending); memmove((char *) oco->buf + oco->count, buf, count); - oco->count += count + padBytes; + oco->count += count; + if (padBytes) { + memset(oco->buf + oco->count, '\0', padBytes); + oco->count += padBytes; + } return count; } |