Commit f9123570 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Mike Gabriel

Set padding bytes to 0 in WriteToClient

commit bed610fcae41ddfe21fa9acde599b17d1d15f5d1 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Jul 9 19:12:44 2012 -0700 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: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: 's avatarKeith Packard <keithp@keithp.com> Tested-by: 's avatarDaniel Stone <daniel@fooishbar.org> Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent 2ecd2a00
......@@ -1003,7 +1003,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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment