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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1395915444-2225-1-git-send-email-guaneryu@gmail.com>
Date:	Thu, 27 Mar 2014 18:17:24 +0800
From:	Eryu Guan <guaneryu@...il.com>
To:	linux-ext4@...r.kernel.org
Cc:	Eryu Guan <guaneryu@...il.com>, Theodore Ts'o <tytso@....edu>
Subject: [PATCH] libext2fs: fix build errors on bigendian hosts

Fix the following build errors on bigendian hosts.

- ctx is a pointer, use '->' not '.'
- add missing argument to ext2fs_dirent_swab_in2

make[2]: Entering directory `/root/e2fsprogs/lib/ext2fs'
        CC inline_data.c
inline_data.c: In function ‘ext2fs_inline_data_dir_iterate’:
inline_data.c:221:5: error: request for member ‘errcode’ in something not a structure or union
  ctx.errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
     ^
inline_data.c:222:9: error: request for member ‘errcode’ in something not a structure or union
  if (ctx.errcode) {
         ^
inline_data.c: In function ‘ext2fs_inline_data_dir_expand’:
inline_data.c:364:2: error: too few arguments to function ‘ext2fs_dirent_swab_in2’
  retval = ext2fs_dirent_swab_in2(fs, buf, size);
  ^
In file included from inline_data.c:19:0:
ext2fs.h:1569:18: note: declared here
 extern errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char *buf, size_t size,
                  ^
make[2]: *** [inline_data.o] Error 1

Cc: Theodore Ts'o <tytso@....edu>
Signed-off-by: Eryu Guan <guaneryu@...il.com>
---
 lib/ext2fs/inline_data.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ext2fs/inline_data.c b/lib/ext2fs/inline_data.c
index 7be0f96..7a81da0 100644
--- a/lib/ext2fs/inline_data.c
+++ b/lib/ext2fs/inline_data.c
@@ -218,8 +218,8 @@ int ext2fs_inline_data_dir_iterate(ext2_filsys fs, ext2_ino_t ino,
 	ctx->buf = data.ea_data;
 	ctx->buflen = data.ea_size;
 #ifdef WORDS_BIGENDIAN
-	ctx.errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
-	if (ctx.errcode) {
+	ctx->errcode = ext2fs_dirent_swab_in2(fs, ctx->buf, ctx->buflen, 0);
+	if (ctx->errcode) {
 		ret |= BLOCK_ABORT;
 		goto out;
 	}
@@ -361,7 +361,7 @@ ext2fs_inline_data_dir_expand(ext2_filsys fs, ext2_ino_t ino,
 		return retval;
 
 #ifdef WORDS_BIGENDIAN
-	retval = ext2fs_dirent_swab_in2(fs, buf, size);
+	retval = ext2fs_dirent_swab_in2(fs, buf, size, 0);
 	if (retval)
 		goto errout;
 #endif
-- 
1.9.0

--
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