]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: check blkid_probe_set_magic() return in ultrix code [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 31 Jan 2012 12:31:23 +0000 (13:31 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 31 Jan 2012 12:31:23 +0000 (13:31 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/partitions/ultrix.c

index fb195f646b0c2f60c1093f3b8f30b62dcfcb835c..853ae6eedbd722db89eb1904f56f4c9fdd97c917 100644 (file)
@@ -52,9 +52,10 @@ static int probe_ultrix_pt(blkid_probe pr,
        if (l->pt_magic != ULTRIX_MAGIC || l->pt_valid != 1)
                goto nothing;
 
-       blkid_probe_set_magic(pr, (ULTRIX_SECTOR << 9) + ULTRIX_OFFSET,
+       if (blkid_probe_set_magic(pr, (ULTRIX_SECTOR << 9) + ULTRIX_OFFSET,
                        sizeof(ULTRIX_MAGIC_STR) - 1,
-                       (unsigned char *) ULTRIX_MAGIC_STR);
+                       (unsigned char *) ULTRIX_MAGIC_STR))
+               goto err;
 
        if (blkid_partitions_need_typeonly(pr))
                /* caller does not ask for details about partitions */