Daniel P. Berrange wrote:
> * src/logging.c: Fix buffer offset in logging read
> ---
>  src/logging.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/logging.c b/src/logging.c
> index e46e2be..07c2b0e 100644
> --- a/src/logging.c
> +++ b/src/logging.c
> @@ -240,7 +240,7 @@ static void virLogStr(const char *str, int len) {
>          tmp = LOG_BUFFER_SIZE - virLogEnd;
>          memcpy(&virLogBuffer[virLogEnd], str, tmp);
>          virLogBuffer[LOG_BUFFER_SIZE] = 0;
> -        memcpy(&virLogBuffer[0], &str[len], len - tmp);
> +        memcpy(&virLogBuffer[0], &str[tmp], len - tmp);

Ack.  Definitely.

valgrind?

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to