]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (udf) fix possible null pointer dereference [coverity scan]
authorKarel Zak <kzak@redhat.com>
Wed, 27 Mar 2013 15:02:07 +0000 (16:02 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 27 Mar 2013 15:02:07 +0000 (16:02 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/udf.c

index c9fb02285a670c54371b52b7541c1c8efc9bc5d8..8702dd04b0e4490fe8d63d1116e869b23e6285fc 100644 (file)
@@ -154,7 +154,8 @@ real_blksz:
                        blkid_probe_get_buffer(pr,
                                        (blkid_loff_t) (loc + b) * bs,
                                        sizeof(*vd));
-
+               if (!vd)
+                       return -1;
                type = le16_to_cpu(vd->tag.id);
                if (type == 0)
                        break;