gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid
	a Y8.8888K problem.

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  <tytso@mit.edu>
+
+	* gen_uuid.c (uuid_generate_time): Mask off the timestamp to avoid
+		a Y8.8888K problem.
+
 2004-04-03  Theodore Ts'o  <tytso@mit.edu>
 
 	* 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 @@
 	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);
 }