From: Karel Zak Date: Tue, 31 Jan 2012 12:31:23 +0000 (+0100) Subject: libblkid: check blkid_probe_set_magic() return in ultrix code [coverity scan] X-Git-Tag: v2.21-rc2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47bcc2768c0012da9ec928de592c1d38e9398ffa;p=thirdparty%2Futil-linux.git libblkid: check blkid_probe_set_magic() return in ultrix code [coverity scan] Signed-off-by: Karel Zak --- diff --git a/libblkid/src/partitions/ultrix.c b/libblkid/src/partitions/ultrix.c index fb195f646b..853ae6eedb 100644 --- a/libblkid/src/partitions/ultrix.c +++ b/libblkid/src/partitions/ultrix.c @@ -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 */