diff options
-rw-r--r-- | launchd/console_redirect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/launchd/console_redirect.c b/launchd/console_redirect.c index 26fa097..7ce3626 100644 --- a/launchd/console_redirect.c +++ b/launchd/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) { |