aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2013-11-13 20:27:21 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-19 21:26:43 +0100
commitc3d5325fc85eba3110f229546bc2b4fe91e3e1c2 (patch)
treed6dd076e8736dae6e7426ece82e752281734c602
parentc70aae4697871f7b50369634e57c36c5d081df4d (diff)
tbf: The memory regions overlap so memmove should be used
-rw-r--r--src/tbf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 5c6c15f..3fd2481 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -1035,7 +1035,7 @@ do_resend:
"next block, and we are done\n", chunk, space);
/* make space for delimiter */
if (delimiter != data)
- memcpy(delimiter + 1, delimiter,
+ memmove(delimiter + 1, delimiter,
data - delimiter);
data++;
space--;
@@ -1056,7 +1056,7 @@ do_resend:
/* the LLC frame chunk ends in this block */
/* make space for delimiter */
if (delimiter != data)
- memcpy(delimiter + 1, delimiter, data - delimiter);
+ memmove(delimiter + 1, delimiter, data - delimiter);
data++;
space--;
/* add LI to delimit frame */