qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: malc <av1474@comtv.ru>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] 879e45c72da1569e07fbbc6a1aa2a708ea796044 breakage
Date: Wed, 21 Nov 2012 08:50:07 +0100	[thread overview]
Message-ID: <50AC87AF.5060803@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1211211110450.5569@linmac>

Il 21/11/2012 08:14, malc ha scritto:
> 
> Commit in the subject broke inet parsing (noticed by a build on a remote
> system without X and only internal vnc server that by default uses
> localhost:0,to=99), following was probably intended, but you're never
> sure:
> 
> diff --git a/qemu-sockets.c b/qemu-sockets.c
> index cfed9c5..e7272c8 100644
> --- a/qemu-sockets.c
> +++ b/qemu-sockets.c
> @@ -529,13 +529,15 @@ static InetSocketAddress *inet_parse(const char 
> *str, Error **errp)
>      optstr = str + pos;
>      h = strstr(optstr, ",to=");
>      if (h) {
> -        if (1 != sscanf(str, "%d%n", &to, &pos) ||
> -            (str[pos] != '\0' && str[pos] != ',')) {
> +        h += 4;
> +        if (1 != sscanf(h, "%d%n", &to, &pos) ||
> +            (h[pos] != '\0' && h[pos] != ',')) {
>              error_setg(errp, "error parsing to= argument");
>              goto fail;
>          }
>          addr->has_to = true;
>          addr->to = to;
> +        optstr = h + pos;
>      }
>      if (strstr(optstr, ",ipv4")) {
>          addr->ipv4 = addr->has_ipv4 = true;
> 

Anthony Perard already submitted this patch, but it missed the -rc0 boat
for some reason.

Paolo

      reply	other threads:[~2012-11-21  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  7:14 [Qemu-devel] 879e45c72da1569e07fbbc6a1aa2a708ea796044 breakage malc
2012-11-21  7:50 ` Paolo Bonzini [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=50AC87AF.5060803@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=av1474@comtv.ru \
    --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).