lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun,  5 Sep 2010 22:33:00 +0400
From:	Kulikov Vasiliy <segooon@...il.com>
To:	kernel-janitors@...r.kernel.org
Cc:	Vasiliy Kulikov <segooon@...il.com>,
	Artem Bityutskiy <dedekind1@...il.com>,
	Adrian Hunter <adrian.hunter@...ia.com>,
	Julia Lawall <julia@...u.dk>, Tejun Heo <tj@...nel.org>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 11/14] ubifs: check return code of ubifs_lpt_lookup

From: Vasiliy Kulikov <segooon@...il.com>

Function ubifs_lpt_lookup may return ERR_PTR(...). Check for it.

Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
---
 Compile tested.

 fs/ubifs/lpt.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index 0084a33..841bb36 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -1351,6 +1351,7 @@ static int read_lsave(struct ubifs_info *c)
 {
 	int err, i;
 	void *buf;
+	struct ubifs_lprops *perr;
 
 	buf = vmalloc(c->lsave_sz);
 	if (!buf)
@@ -1370,7 +1371,11 @@ static int read_lsave(struct ubifs_info *c)
 		 */
 		if (lnum >= c->leb_cnt)
 			continue;
-		ubifs_lpt_lookup(c, lnum);
+		perr = ubifs_lpt_lookup(c, lnum);
+		if (IS_ERR(perr)) {
+			err = PTR_ERR(perr);
+			goto out;
+		}
 	}
 out:
 	vfree(buf);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ