summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/readv_common.cc
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2020-01-13 10:14:30 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-13 10:16:07 -0800
commitf54b9c0ee6e02f9c8bf32aa268c9028ff741bf7c (patch)
treeb52e1206fd7e47fc30c2a625f37b44481fabbd85 /test/syscalls/linux/readv_common.cc
parentbf6429b944aed6de073c62ceb446cfaed5042dbc (diff)
tests: fix errors detected by asan.
PiperOrigin-RevId: 289467083
Diffstat (limited to 'test/syscalls/linux/readv_common.cc')
-rw-r--r--test/syscalls/linux/readv_common.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/syscalls/linux/readv_common.cc b/test/syscalls/linux/readv_common.cc
index 491d5f40f..2694dc64f 100644
--- a/test/syscalls/linux/readv_common.cc
+++ b/test/syscalls/linux/readv_common.cc
@@ -154,7 +154,7 @@ void ReadBuffersOverlapping(int fd) {
char* expected_ptr = expected.data();
memcpy(expected_ptr, &kReadvTestData[overlap_bytes], overlap_bytes);
memcpy(&expected_ptr[overlap_bytes], &kReadvTestData[overlap_bytes],
- kReadvTestDataSize);
+ kReadvTestDataSize - overlap_bytes);
struct iovec iovs[2];
iovs[0].iov_base = buffer.data();