qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu_strdup() doesn't copy alast character
Date: Mon, 25 Aug 2008 23:05:19 +0300	[thread overview]
Message-ID: <f43fc5580808251305u42755ff3l64ea13fc69fa429e@mail.gmail.com> (raw)
In-Reply-To: <20080825092211.GG6192@minantech.com>

On 8/25/08, Gleb Natapov <gleb@qumranet.com> wrote:
>
>  Because of off by one error.
>
>
>  Signed-off-by: Gleb Natapov <gleb@qumranet.com>
>
>  diff --git a/qemu-malloc.c b/qemu-malloc.c
>  index 8ad6168..3bffae1 100644
>  --- a/qemu-malloc.c
>  +++ b/qemu-malloc.c
>  @@ -60,6 +60,6 @@ char *qemu_strdup(const char *str)
>      ptr = qemu_malloc(len + 1);
>      if (!ptr)
>          return NULL;
>  -    pstrcpy(ptr, len, str);
>  +    pstrcpy(ptr, len + 1, str);
>      return ptr;
>   }

Thanks, applied. I had introduced this in the patch (r5044) where I
changed some strcpys to pstrcpys. Maybe the same bug got in somewhere
else too.

      reply	other threads:[~2008-08-25 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25  9:22 [Qemu-devel] [PATCH] qemu_strdup() doesn't copy alast character Gleb Natapov
2008-08-25 20:05 ` Blue Swirl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f43fc5580808251305u42755ff3l64ea13fc69fa429e@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).