[PATCH v1 1/2] fsx-linux: Fix reference buffer corruption in op_map_read()

Jinseok Kim <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
op_map_read() copied mmapped memory to file_buff before comparison,
overwriting the reference data. Drop the invalid memcpy().

Signed-off-by: Jinseok Kim <[email protected]>
---
 testcases/kernel/fs/fsx-linux/fsx-linux.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/testcases/kernel/fs/fsx-linux/fsx-linux.c b/testcases/kernel/fs/fsx-linux/fsx-linux.c
index 2e0f17a5e..21390c58c 100644
--- a/testcases/kernel/fs/fsx-linux/fsx-linux.c
+++ b/testcases/kernel/fs/fsx-linux/fsx-linux.c
@@ -219,8 +219,6 @@ static int op_map_read(void)
 		file_desc,
 		(off_t)pos.offset);

-	memcpy(file_buff + pos.offset, addr, pos.size);
-
 	int ret = memory_compare(
 		addr,
 		file_buff + pos.offset,
--
2.43.0

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.