From 9c6fb72b852dbeea752caa05bbdc4236dbb08d40 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 18 Dec 2012 05:11:39 +0100 Subject: [PATCH] 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 --- src/smbios.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); -- 2.39.5