[SerialICE] Patch set updated for serialice: qemu-0.15.x/serialice-com: Fix parsing of version string

Patrick Rudolph (siro@das-labor.org) gerrit at coreboot.org
Thu Apr 28 14:20:00 CEST 2016


Patrick Rudolph (siro at das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14510

-gerrit

commit 7618a741867826c664c46fb1d1405b54bf5184c5
Author: Patrick Rudolph <siro at das-labor.org>
Date:   Mon Apr 25 12:24:03 2016 +0200

    qemu-0.15.x/serialice-com: Fix parsing of version string
    
    Check buffer contents after writing to it.
    Fixes version string wasn't parsed at all, as it starts
    with \r\n.
    
    Change-Id: Ia012434b3806f936971c8f9e99ed198f85171111
    Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
 qemu-0.15.x/serialice-com.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-0.15.x/serialice-com.c b/qemu-0.15.x/serialice-com.c
index 1373f57..2e59094 100644
--- a/qemu-0.15.x/serialice-com.c
+++ b/qemu-0.15.x/serialice-com.c
@@ -360,9 +360,9 @@ static void msg_version(void)
     memset(s->buffer, 0, BUFFER_SIZE);
     serialice_read(s, s->buffer, 1);
     serialice_read(s, s->buffer, 1);
-    while (s->buffer[len++] != '\n') {
+    do {
         serialice_read(s, s->buffer + len, 1);
-    }
+    } while (s->buffer[len++] != '\n');
     s->buffer[len - 1] = '\0';
 
     printf("%s\n", s->buffer);



More information about the SerialICE mailing list