diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 389c5eeb5d..636307bedf 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -84,7 +84,7 @@ static ssize_t ga_pipe_read_str(int fd[2], char **str) *str = g_realloc(*str, len + n + 1); memcpy(*str + len, buf, n); len += n; - *str[len] = '\0'; + (*str)[len] = '\0'; } close(fd[0]); fd[0] = -1;