diff options
-rw-r--r-- | hw/xquartz/console_redirect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xquartz/console_redirect.c b/hw/xquartz/console_redirect.c index 30e397a6b..8fdce4699 100644 --- a/hw/xquartz/console_redirect.c +++ b/hw/xquartz/console_redirect.c @@ -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; } |