]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libuuid: set variant in the corrrect byte: __uuid_set_variant_and_version
authoroittaa <8972248+oittaa@users.noreply.github.com>
Tue, 16 Jul 2024 01:35:58 +0000 (03:35 +0200)
committerGitHub <noreply@github.com>
Tue, 16 Jul 2024 01:35:58 +0000 (03:35 +0200)
libuuid/src/gen_uuid.c

index 1ccd4e15ef3b6cb9a92a23885ff0da8ef812688f..fca7e96e2587b5b3ead7af5a4af3d51850d10a81 100644 (file)
@@ -589,7 +589,7 @@ static void __uuid_set_variant_and_version(uuid_t uuid, int version)
 {
        uuid[6] = (uuid[6] & UUID_TYPE_MASK) | version << UUID_TYPE_SHIFT;
        /* only DCE is supported */
-       uuid[8] = (uuid[10] & 0x3F) | 0x80;
+       uuid[8] = (uuid[8] & 0x3F) | 0x80;
 }
 
 /*