mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
XQuartz: console_redirect: Properly zero-out the tail of the array on realloc()
We forgot to multiply by sizeof(), so it wasn't fully zeroed out. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
@@ -365,8 +365,8 @@ xq_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd)
|
||||
BLOCK_DONE;
|
||||
}
|
||||
redirect_fds = new_array;
|
||||
memset(redirect_fds + n_redirect_fds, 0, new_n -
|
||||
n_redirect_fds);
|
||||
memset(redirect_fds + n_redirect_fds, 0, (new_n -
|
||||
n_redirect_fds) * sizeof(*redirect_fds));
|
||||
n_redirect_fds = new_n;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user