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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1279807398-13680-2-git-send-email-tytso@mit.edu>
Date:	Thu, 22 Jul 2010 10:03:12 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Renzo Davoli <renzo@...unibo.it>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	Theodore Ts'o <tytso@....edu>
Subject: [PATCH 1/7] tst_extents: Fix 64-bit bugs in do_goto_block()

Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
 lib/ext2fs/extent.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c
index 030d73a..490dbe8 100644
--- a/lib/ext2fs/extent.c
+++ b/lib/ext2fs/extent.c
@@ -1981,8 +1981,8 @@ void do_goto_block(int argc, char **argv)
 	struct ext2fs_extent	extent;
 	errcode_t		retval;
 	int			op = EXT2_EXTENT_NEXT_LEAF;
-	blk_t			blk;
-	int			level = 0;
+	blk64_t			blk;
+	int			level = 0, err;
 
 	if (common_extent_args_process(argc, argv, 2, 3, "goto_block",
 				       "block [level]", 0))
@@ -1991,16 +1991,18 @@ void do_goto_block(int argc, char **argv)
 	if (strtoblk(argv[0], argv[1], &blk))
 		return;
 
-	if (argc == 3)
-		if (strtoblk(argv[0], argv[2], &level))
+	if (argc == 3) {
+		level = parse_ulong(argv[2], argv[0], "level", &err);
+		if (err)
 			return;
+	}
 
 	retval = extent_goto(current_handle, level, (blk64_t) blk);
 
 	if (retval) {
 		com_err(argv[0], retval,
-			"while trying to go to block %u, level %d",
-			blk, level);
+			"while trying to go to block %llu, level %d",
+			(unsigned long long) blk, level);
 		return;
 	}
 
-- 
1.7.0.4

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ