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]
Message-ID: <87k5fi4l49.wl%ysato@users.sourceforge.jp>
Date:	Fri, 18 Jul 2008 23:18:46 -0400
From:	Yoshinori Sato <ysato@...rs.sourceforge.jp>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] filldir write data missing size

"loff_t" is long long.
But "d_off" is unsigned long.

Signed-off-by: Yoshinori Sato <ysato@...rs.sourceforge.jp>

diff --git a/fs/readdir.c b/fs/readdir.c
index 4e026e5..01e7152
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -159,7 +159,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
 		return -EOVERFLOW;
 	dirent = buf->previous;
 	if (dirent) {
-		if (__put_user(offset, &dirent->d_off))
+		if (__put_user((unsigned long)offset, &dirent->d_off))
 			goto efault;
 	}
 	dirent = buf->current_dir;

-- 
Yoshinori Sato
<ysato@...rs.sourceforge.jp>
--
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