From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tb54c-0003vL-Iy for qemu-devel@nongnu.org; Wed, 21 Nov 2012 02:50:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tb54W-0002cD-O6 for qemu-devel@nongnu.org; Wed, 21 Nov 2012 02:50:18 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:61500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tb54W-0002aQ-Fg for qemu-devel@nongnu.org; Wed, 21 Nov 2012 02:50:12 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so2835439eaa.4 for ; Tue, 20 Nov 2012 23:50:10 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50AC87AF.5060803@redhat.com> Date: Wed, 21 Nov 2012 08:50:07 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] 879e45c72da1569e07fbbc6a1aa2a708ea796044 breakage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org 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