From patchwork Fri Jan 15 20:07:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [STABLE] Fix corner case in chardev udp: parameter Date: Fri, 15 Jan 2010 10:07:06 -0000 From: Jan Kiszka X-Patchwork-Id: 42994 Message-Id: <4B50CAEA.6070900@web.de> To: Anthony Liguori Cc: Gerd Hoffmann , qemu-devel The missing '@' broke 'udp::@:' parsing. Signed-off-by: Jan Kiszka --- qemu-char.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b13f8d4..a8a92f5 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2314,7 +2314,7 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename) qemu_opt_set(opts, "backend", "udp"); if (sscanf(p, "%64[^:]:%32[^@,]%n", host, port, &pos) < 2) { host[0] = 0; - if (sscanf(p, ":%32[^,]%n", port, &pos) < 1) { + if (sscanf(p, ":%32[^@,]%n", port, &pos) < 1) { fprintf(stderr, "udp #1\n"); goto fail; }