]> xenbits.xensource.com Git - seabios.git/commitdiff
display_uuid(): fix incomplete check after the loop
authorLaszlo Ersek <lersek@redhat.com>
Tue, 18 Dec 2012 04:11:39 +0000 (05:11 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 22 Dec 2012 03:50:52 +0000 (22:50 -0500)
In the v2->v3 change of what would become commit 37676f83
<http://www.seabios.org/pipermail/seabios/2012-December/005166.html>, the
defense against an initial "addr > end" condition ("wraparound") was
erroneously loosened.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
src/smbios.c

index aaa99bc40fd0d575d8fded60aa53d0d459736aa7..23713a288b111995fff2fe9de972f4e1f8c1ded8 100644 (file)
@@ -569,8 +569,8 @@ display_uuid(void)
         addr += 2;
     }
 
-    /* parsing finished, UUID not found */
-    if (addr == end)
+    /* parsing finished or skipped entirely, UUID not found */
+    if (addr >= end)
         return;
 
     uuid = (u8 *)(addr + offsetof(struct smbios_type_1, uuid));