diff --git a/qga/commands-posix.c b/qga/commands-posix.c index c2bd0b4316..bb41fa9fa5 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -85,7 +85,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;