summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2013-03-27 16:02:07 +0100
committerKarel Zak2013-03-27 16:02:07 +0100
commit6acde8a3b1738afa8e3512e4203905f548465eb0 (patch)
treeac8fa12ca8509b1cbbd1bf281a31e6a4f665ec4d
parentlscpu: make /proc/sysinfo usage more robust [coverity scan] (diff)
downloadkernel-qcow2-util-linux-6acde8a3b1738afa8e3512e4203905f548465eb0.tar.gz
kernel-qcow2-util-linux-6acde8a3b1738afa8e3512e4203905f548465eb0.tar.xz
kernel-qcow2-util-linux-6acde8a3b1738afa8e3512e4203905f548465eb0.zip
libblkid: (udf) fix possible null pointer dereference [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--libblkid/src/superblocks/udf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libblkid/src/superblocks/udf.c b/libblkid/src/superblocks/udf.c
index c9fb02285..8702dd04b 100644
--- a/libblkid/src/superblocks/udf.c
+++ b/libblkid/src/superblocks/udf.c
@@ -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;