From: Laszlo Ersek Date: Tue, 18 Dec 2012 04:11:39 +0000 (+0100) Subject: display_uuid(): fix incomplete check after the loop X-Git-Tag: rel-1.7.2~4 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9c6fb72b852dbeea752caa05bbdc4236dbb08d40;p=seabios.git display_uuid(): fix incomplete check after the loop In the v2->v3 change of what would become commit 37676f83 , the defense against an initial "addr > end" condition ("wraparound") was erroneously loosened. Signed-off-by: Laszlo Ersek --- diff --git a/src/smbios.c b/src/smbios.c index aaa99bc..23713a2 100644 --- a/src/smbios.c +++ b/src/smbios.c @@ -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));