Skip to contentSkip to conversation

libuuid - check clock value from LIBUUID_CLOCK_FILE

PATCH Applied Michael Trapp 2 participants 2 messages Aug 2, 2022 – Aug 22, 2022 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libuuid - check clock value from LIBUUID_CLOCK_FILE

The clock value from the LIBUUID_CLOCK_FILE must be checked in case of an update of libuuid. If clock==CLOCK_SEQ_CONT it must be set to a new value.

---
 libuuid/src/gen_uuid.c | 5 +++++
 1 file changed, 5 insertions(+)
libuuid/src/gen_uuid.c +5 -0
index 807dcd115..e1ba3c3d0 100644
@@ -274,6 +274,11 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
 			last.tv_usec = tv2;
 			adjustment = a;
 		}
+		// reset in case of reserved CLOCK_SEQ_CONT
+		if (clock_seq == CLOCK_SEQ_CONT) {
+			last.tv_sec = 0;
+			last.tv_usec = 0;
+		}
 	}
 
 	if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
maintainer Applied
#1 lore raw
Quoted 2 lines · Michael Trapp
 libuuid/src/gen_uuid.c | 5 +++++
 1 file changed, 5 insertions(+)

Applied, thanks. (And sorry for the delay :-)

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com