projects
/
platform
/
upstream
/
xorg-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e7f61d
)
XQuartz: Fix an array-index-out-of-bounds crasher
author
Jeremy Huddleston
<jeremyhu@apple.com>
Sat, 14 May 2011 21:09:45 +0000
(14:09 -0700)
committer
Jeremy Huddleston
<jeremyhu@apple.com>
Sun, 15 May 2011 02:15:26 +0000
(19:15 -0700)
Found-by: GuardMalloc
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
hw/xquartz/console_redirect.c
patch
|
blob
|
history
diff --git
a/hw/xquartz/console_redirect.c
b/hw/xquartz/console_redirect.c
index
cdd2b89
..
70a819e
100644
(file)
--- a/
hw/xquartz/console_redirect.c
+++ b/
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) {