X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Fvolume_id%2Fvolume_id%2Fiso9660%2Fiso9660.c;h=fa769d3ca385c5f5355c4db769d53bf9adf19c52;hp=6af9e8befc4d5fc7de587f5835338b247ed794a8;hb=7979e3d4b7c56acee2fe0e9a9fefb3fe0d83771e;hpb=51df9ee4965516b17dcd50647546ee970df87b32 diff --git a/extras/volume_id/volume_id/iso9660/iso9660.c b/extras/volume_id/volume_id/iso9660/iso9660.c index 6af9e8bef..fa769d3ca 100644 --- a/extras/volume_id/volume_id/iso9660/iso9660.c +++ b/extras/volume_id/volume_id/iso9660/iso9660.c @@ -70,7 +70,7 @@ int volume_id_probe_iso9660(struct volume_id *id, __u64 off) if (is == NULL) return -1; - if (strncmp(is->iso.id, "CD001", 5) == 0) { + if (memcmp(is->iso.id, "CD001", 5) == 0) { char root_label[VOLUME_ID_LABEL_SIZE+1]; int vd_offset; int i; @@ -96,14 +96,14 @@ int volume_id_probe_iso9660(struct volume_id *id, __u64 off) } if (!found_svd || - (found_svd && !strncmp(root_label, id->label, 16))) + (found_svd && !memcmp(root_label, id->label, 16))) { volume_id_set_label_raw(id, root_label, 32); volume_id_set_label_string(id, root_label, 32); } goto found; } - if (strncmp(is->hs.id, "CDROM", 5) == 0) + if (memcmp(is->hs.id, "CDROM", 5) == 0) goto found; return -1;