From d1492994a51719dc59932151b55a9b24e1879bce Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 4 May 2004 20:51:02 -0400 Subject: [PATCH] gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid a Y8.8888K problem. --- lib/uuid/ChangeLog | 5 +++++ lib/uuid/gen_uuid.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog index fd665c5..ba1e63c 100644 --- a/lib/uuid/ChangeLog +++ b/lib/uuid/ChangeLog @@ -1,3 +1,8 @@ +2004-05-04 Theodore Ts'o + + * gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid + a Y8.8888K problem. + 2004-04-03 Theodore Ts'o * Makefile.in: Update the modtime even if subst doesn't need to diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c index 3493649..30d6202 100644 --- a/lib/uuid/gen_uuid.c +++ b/lib/uuid/gen_uuid.c @@ -283,7 +283,7 @@ void uuid_generate_time(uuid_t out) get_clock(&clock_mid, &uu.time_low, &uu.clock_seq); uu.clock_seq |= 0x8000; uu.time_mid = (uint16_t) clock_mid; - uu.time_hi_and_version = (clock_mid >> 16) | 0x1000; + uu.time_hi_and_version = ((clock_mid >> 16) & 0x0FFF) | 0x1000; memcpy(uu.node, node_id, 6); uuid_pack(&uu, out); } -- 1.8.3.1