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 <>
parent 69c2207d
......@@ -27,6 +27,9 @@ static inline int immed_copy(void *src, void *dest, size_t len)
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