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]
Date:	Thu, 15 Nov 2012 16:13:26 +0800
From:	Zheng Liu <gnehzuil.liu@...il.com>
To:	linux-ext4@...r.kernel.org, tytso@....edu
Cc:	Zheng Liu <wenqing.lz@...bao.com>
Subject: [PATCH 4/7] libext2fs: return written bytes in ext2fs_try_to_write_inline_data

From: Zheng Liu <wenqing.lz@...bao.com>

unwritten variable is assigned to the bytes of written data if writting to
inline data is done.  Otherwise, it will be assigned to 0.

Signed-off-by: Zheng Liu <wenqing.lz@...bao.com>
---
 lib/ext2fs/inline_data.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/ext2fs/inline_data.c b/lib/ext2fs/inline_data.c
index 7f5ec3e..fd89360 100644
--- a/lib/ext2fs/inline_data.c
+++ b/lib/ext2fs/inline_data.c
@@ -890,6 +890,11 @@ errcode_t ext2fs_try_to_write_inline_data(ext2_filsys fs, ext2_ino_t ino,
 	retval = ext2fs_write_inode_full(fs, ino, (void *)inode,
 					 EXT2_INODE_SIZE(fs->super));
 
+	if (!retval)
+		*written = nbytes;
+	else
+		*written = 0;
+
 out:
 	ext2fs_free_mem(&inode);
 	return retval;
-- 
1.7.12.rc2.18.g61b472e

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