From eed5fbd121582a9e1ce4668ac4b60eddbf76d35e Mon Sep 17 00:00:00 2001 From: johann Date: Tue, 3 Mar 2009 13:57:01 +0000 Subject: [PATCH] Branch b1_8 b=18374 i=adilger i=shadow use memmove instead of memcpy when shrinking the reply since the two memory areas can overlap. --- lustre/ptlrpc/pack_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 863d821..7a1bf08 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -670,7 +670,7 @@ void lustre_shrink_reply_v2(struct ptlrpc_request *req, int segment, newpos = lustre_msg_buf_v2(msg, segment + 1, 0); LASSERT(newpos <= tail); if (newpos != tail) - memcpy(newpos, tail, tail_len); + memmove(newpos, tail, tail_len); } if (newlen == 0 && msg->lm_bufcount > segment + 1) { -- 1.8.3.1