Skip to contentSkip to conversation

Fix corner case in chardev udp: parameter

PATCH RESEND Applied Jan Kiszka 3 participants 3 messages Mar 7, 2010 – Mar 13, 2010

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH RESEND 1/1 Fix corner case in chardev udp: parameter

The missing '@' broke 'udp::<port>@:<port>' parsing.

---
 qemu-char.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu-char.c +1 -1
index 86c7c5a..0d8553d 100644
@@ -2333,7 +2333,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) {
                 goto fail;
             }
         }
#1 lore raw
Quoted 4 lines · Jan Kiszka

The missing '@' broke 'udp::<port>@:<port>' parsing.

Applied to stable, thanks.

Regards,

Anthony Liguori

Quoted 19 lines
---
  qemu-char.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
qemu-char.c +1 -1
index 86c7c5a..0d8553d 100644
@@ -2333,7 +2333,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) {
                  goto fail;
              }
          }
#2 lore raw
Quoted 7 lines · Anthony Liguori
Quoted 4 lines · Jan Kiszka

The missing '@' broke 'udp::<port>@:<port>' parsing.

Applied to stable, thanks.

The same problem exists in HEAD. Shouldn't it be applied here too?

Quoted 28 lines

Regards,

Anthony Liguori

Quoted 19 lines
---
  qemu-char.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
qemu-char.c +1 -1
index 86c7c5a..0d8553d 100644
@@ -2333,7 +2333,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) {
                  goto fail;
              }
          }
Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net