]> err.no Git - util-linux/commitdiff
libblkid: wrong PT detection on RAID0
authorKarel Zak <kzak@redhat.com>
Fri, 13 Aug 2010 07:59:31 +0000 (09:59 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Aug 2010 07:59:31 +0000 (09:59 +0200)
Reported-by: Yulia Kopkova <ykopkova@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/partitions/partitions.c

index 5597181a94b24116e3e2e6fef754e640c30af1be..d6abc203de35a3e825689b75d8fa2a2944225893 100644 (file)
@@ -833,7 +833,7 @@ int blkid_probe_is_covered_by_pt(blkid_probe pr,
        for (i = 0; i < nparts; i++) {
                blkid_partition par = &ls->parts[i];
 
-               if (par->start + par->size > pr->size) {
+               if (par->start + par->size > (pr->size >> 9)) {
                        DBG(DEBUG_LOWPROBE, printf("partition #%d overflows "
                                        "device (off=%lu size=%lu)\n",
                                        par->partno, par->start, par->size));