The version string in DDF suberblock does not include the null terminator
and the snprintf() function writes at most "size" bytes *including* the
null byte.
old version:
ID_FS_VERSION=02.00.0
new version:
ID_FS_VERSION=02.00.00
Signed-off-by: Karel Zak <kzak@redhat.com>
return -1;
found:
volume_id_set_uuid(id, ddf->guid, DDF_GUID_LENGTH, UUID_STRING);
- snprintf(id->type_version, DDF_REV_LENGTH, "%s", ddf->ddf_rev);
+ snprintf(id->type_version, DDF_REV_LENGTH + 1, "%s", ddf->ddf_rev);
volume_id_set_usage(id, VOLUME_ID_RAID);
id->type = "ddf_raid_member";
return 0;