]> err.no Git - systemd/commitdiff
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 c094661cccd12a602d15a427f37924472d750842..0a3bd39992c46b538401bdca295f474e1c31f953 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;