mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 20:40:04 +01: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>
(cherry picked from commit 7c3d2e4828)
This commit is contained in:
parent
2141f21d51
commit
0754f74a53
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue