>From a1ae967025c63e9e8557c2f72818ee3cd3202e72 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 6 Feb 2016 10:02:50 +0000 Subject: [PATCH 4/4] inspection: Convert the GUID from binary to text correctly. Fixes commit d3b1387bdd118762606d6b589b9e2e67ae582d3b. --- src/inspect-fs-windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c index 343ade9..ba72727 100644 --- a/src/inspect-fs-windows.c +++ b/src/inspect-fs-windows.c @@ -693,8 +693,8 @@ extract_guid_from_registry_blob (guestfs_h *g, const void *blob) data4 = be64toh (data4); return safe_asprintf (g, - "%08" PRIX32 "-%04" PRIX16 "-%04" PRIX16 "-%04" PRIX64 "-%06" PRIX64, - data1, data2, data3, data4 >> 48, data4 << 16); + "%08" PRIX32 "-%04" PRIX16 "-%04" PRIX16 "-%04" PRIX64 "-%012" PRIX64, + data1, data2, data3, data4 >> 48, data4 & 0xffffffffffff); } /* NB: This function DOES NOT test for the existence of the file. It -- 2.5.0