From: Karel Zak Date: Wed, 9 Jan 2008 14:13:38 +0000 (+0100) Subject: volume_id: fix UUID raw buffer usage X-Git-Tag: 174~1765 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b4f9b167b2d71fc12acdc953aa34474bfa93f73;p=systemd volume_id: fix UUID raw buffer usage Signed-off-by: Karel Zak --- diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c index c094661c..0a3bd399 100644 --- a/extras/volume_id/lib/util.c +++ b/extras/volume_id/lib/util.c @@ -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;