]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: don't check for size on UBI (char dev)
authorKarel Zak <kzak@redhat.com>
Tue, 11 Jul 2017 10:17:40 +0000 (12:17 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Sep 2017 12:05:14 +0000 (14:05 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/probe.c

index 4ccffd8f674122ef050f3be45f6c12ac6dabaadb..aa663cf59698939abdaa7f419ac9507c16f9a7f9 100644 (file)
@@ -626,7 +626,7 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr, uint64_t off, uint64_t len
                return NULL;
        }
 
-       if (len == 0 || pr->off + pr->size < real_off + len) {
+       if (len == 0 || (!S_ISCHR(pr->mode) && pr->off + pr->size < real_off + len)) {
                DBG(BUFFER, ul_debug("\t  ignore: request out of probing area"));
                errno = 0;
                return NULL;