XQuartz: Fix an array-index-out-of-bounds crasher
Found-by: GuardMalloc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
0e7f61d72c
commit
fd5f630bc4
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user