From: Pali Rohár Date: Tue, 8 Dec 2020 23:36:13 +0000 (+0100) Subject: libblkid: iso9660: check that iso->publisher_id and iso->application_id are not file... X-Git-Tag: v2.37-rc1~236 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ff184b5b561494152e6e4a4217e4351948a6b31;p=thirdparty%2Futil-linux.git libblkid: iso9660: check that iso->publisher_id and iso->application_id are not file paths ECMA 119 (ISO 9660) says that if the first byte is set to (5F), the remaining bytes of this field shall specify an identifier for a file containing the data. As libblkid does not support reading files from the filesystem itself it cannot parse fields which starts with 0x5F '_' char. So for now ignore iso->publisher_id and iso->application_id values which starts with '_' character. Signed-off-by: Pali Rohár --- diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c index 9cfbc0dfec..c9226e4358 100644 --- a/libblkid/src/superblocks/iso9660.c +++ b/libblkid/src/superblocks/iso9660.c @@ -193,11 +193,11 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag) blkid_probe_set_id_label(pr, "SYSTEM_ID", iso->system_id, sizeof(iso->system_id)); - if (!is_str_empty(iso->publisher_id, sizeof(iso->publisher_id))) + if (!is_str_empty(iso->publisher_id, sizeof(iso->publisher_id)) && iso->publisher_id[0] != '_') blkid_probe_set_id_label(pr, "PUBLISHER_ID", iso->publisher_id, sizeof(iso->publisher_id)); - if (!is_str_empty(iso->application_id, sizeof(iso->application_id))) + if (!is_str_empty(iso->application_id, sizeof(iso->application_id)) && iso->application_id[0] != '_') blkid_probe_set_id_label(pr, "APPLICATION_ID", iso->application_id, sizeof(iso->application_id));