From: johann Date: Tue, 3 Mar 2009 13:58:36 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_164~40 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ce4dcaec8149419b7025a413190c232a55acc132;p=fs%2Flustre-release.git Branch HEAD 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 ce2e237..93168eb 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -439,7 +439,7 @@ int lustre_shrink_msg_v2(struct lustre_msg_v2 *msg, 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); } out: return lustre_msg_size_v2(msg->lm_bufcount, msg->lm_buflens);