volume_id: fix UUID raw buffer usage
authorKarel Zak <kzak@redhat.com>
Wed, 9 Jan 2008 14:13:38 +0000 (15:13 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 9 Jan 2008 15:15:07 +0000 (16:15 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
extras/volume_id/lib/util.c

index c094661..0a3bd39 100644 (file)
@@ -215,8 +215,8 @@ void volume_id_set_usage(struct volume_id *id, enum volume_id_usage usage_id)
 
 void volume_id_set_label_raw(struct volume_id *id, const uint8_t *buf, size_t count)
 {
-       if (count > sizeof(id->label))
-               count = sizeof(id->label);
+       if (count > sizeof(id->label_raw))
+               count = sizeof(id->label_raw);
 
        memcpy(id->label_raw, buf, count);
        id->label_raw_len = count;