diff mbox

[RESEND,STABLE] Fix corner case in chardev udp: parameter

Message ID 4B937FE0.5080609@siemens.com
State New
Headers show

Commit Message

Jan Kiszka March 7, 2010, 10:28 a.m. UTC
The missing '@' broke 'udp::<port>@:<port>' parsing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 qemu-char.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Anthony Liguori March 8, 2010, 4:44 p.m. UTC | #1
On 03/07/2010 04:28 AM, Jan Kiszka wrote:
> The missing '@' broke 'udp::<port>@:<port>' parsing.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>    

Applied to stable, thanks.

Regards,

Anthony Liguori

> ---
>   qemu-char.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index 86c7c5a..0d8553d 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -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;
>               }
>           }
>
>
Aurelien Jarno March 13, 2010, 11:05 a.m. UTC | #2
On Mon, Mar 08, 2010 at 10:44:37AM -0600, Anthony Liguori wrote:
> On 03/07/2010 04:28 AM, Jan Kiszka wrote:
>> The missing '@' broke 'udp::<port>@:<port>' parsing.
>>
>> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>>    
>
> Applied to stable, thanks.


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

>
> Regards,
>
> Anthony Liguori
>
>> ---
>>   qemu-char.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/qemu-char.c b/qemu-char.c
>> index 86c7c5a..0d8553d 100644
>> --- a/qemu-char.c
>> +++ b/qemu-char.c
>> @@ -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;
>>               }
>>           }
>>
>>    
>
>
>
>
diff mbox

Patch

diff --git a/qemu-char.c b/qemu-char.c
index 86c7c5a..0d8553d 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -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;
             }
         }