aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/console_redirect.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xquartz/console_redirect.c')
-rw-r--r--xorg-server/hw/xquartz/console_redirect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/hw/xquartz/console_redirect.c b/xorg-server/hw/xquartz/console_redirect.c
index cdd2b8960..70a819e42 100644
--- a/xorg-server/hw/xquartz/console_redirect.c
+++ b/xorg-server/hw/xquartz/console_redirect.c
@@ -116,7 +116,7 @@ static inline int _read_redirect(int fd, int flush) {
*s='\0';
asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p);
} else if(aslr->buf != p) {
- memmove(aslr->buf, p, BUF_SIZE);
+ memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf));
aslr->w = aslr->buf + (s - p);
break;
} else if(nbytes == BUF_SIZE - 1) {