From: johann Date: Tue, 3 Mar 2009 13:47:52 +0000 (+0000) Subject: Branch b1_6 X-Git-Tag: GIT_EPOCH_B1_6~2^5~154 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=abe9b75f50203d0f508e300a78fd921f01053660;p=fs%2Flustre-release.git Branch b1_6 b=18374 i=adilger i=shadow use memmove instead of memcpy when shrinking the reply since the two memory areas can overlap. --- diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index d625d55..801ad77 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -655,7 +655,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) {