Commit 092d6c8e authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Exit immed_copy() if src/dest address is NULL or data length is zero.


Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 69c2207d
......@@ -27,6 +27,9 @@ static inline int immed_copy(void *src, void *dest, size_t len)
MPIDI_FUNC_ENTER(MPID_STATE_IMMED_COPY);
if (src == NULL || dest == NULL || len == 0)
goto fn_exit;
switch (len) {
case 1:
*(uint8_t *) dest = *(uint8_t *) src;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment