From ce4dcaec8149419b7025a413190c232a55acc132 Mon Sep 17 00:00:00 2001 From: johann Date: Tue, 3 Mar 2009 13:58:36 +0000 Subject: [PATCH] Branch HEAD 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 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); -- 1.8.3.1