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>] [day] [month] [year] [list]
Date:	Thu, 23 Jul 2009 11:33:14 -0600
From:	Latchesar Ionkov <lucho@...kov.net>
To:	V9FS Developers <v9fs-developer@...ts.sourceforge.net>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] 9p: reset the stat buffer offset after each read

The stat buffer offset variable (i) is set to zero at the beginning of
the v9fs_dir_readdir function. It should be reset to 0 each time data
is read from the file server.

Signed-off-by: Latchesar Ionkov <lucho@...kov.net>

diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index 873cd31..9b0525f 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -74,7 +74,7 @@ static int v9fs_dir_readdir(struct file *filp, void
*dirent, filldir_t filldir)
 	struct p9_fid *fid;
 	int buflen;
 	char *statbuf;
-	int n, i = 0;
+	int n, i;

 	P9_DPRINTK(P9_DEBUG_VFS, "name %s\n", filp->f_path.dentry->d_name.name);
 	fid = filp->private_data;
@@ -90,6 +90,7 @@ static int v9fs_dir_readdir(struct file *filp, void
*dirent, filldir_t filldir)
 		if (err <= 0)
 			break;

+		i = 0;
 		n = err;
 		while (i < n) {
 			err = p9stat_read(statbuf + i, buflen-i, &st,
--
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