diff options
author | Lukas Larsson <[email protected]> | 2013-04-24 14:29:21 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-04-24 14:29:21 +0200 |
commit | c3e3b87163abebd37f1b1ef40742634ea43dfba3 (patch) | |
tree | 48bf19e25cef6654bae48414dd0c0e89e5e596ba | |
parent | 3cee6f0f5ddc03a9987c97be09d3c9bce473ba47 (diff) | |
parent | 6fcfb390c8d70aa4d7abfdfd12d13aa131e44601 (diff) | |
download | otp-c3e3b87163abebd37f1b1ef40742634ea43dfba3.tar.gz otp-c3e3b87163abebd37f1b1ef40742634ea43dfba3.tar.bz2 otp-c3e3b87163abebd37f1b1ef40742634ea43dfba3.zip |
Merge branch 'sv-ttsl-valgrind' into maint
* sv-ttsl-valgrind:
Fix src/dest overlap in ttsl driver
fix valgrind error in erts/emulator/drivers/unix/ttsl_drv.c
OTP-11064
-rw-r--r-- | erts/emulator/drivers/unix/ttsl_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/drivers/unix/ttsl_drv.c b/erts/emulator/drivers/unix/ttsl_drv.c index 8912d148a5..bedb5ef784 100644 --- a/erts/emulator/drivers/unix/ttsl_drv.c +++ b/erts/emulator/drivers/unix/ttsl_drv.c @@ -823,7 +823,7 @@ static int del_chars(int n) r = llen - lpos - l; /* Characters after deleted */ /* Fix up buffer and buffer pointers. */ if (r > 0) - memcpy(lbuf + lpos, lbuf + pos, r * sizeof(Uint32)); + memmove(lbuf + lpos, lbuf + pos, r * sizeof(Uint32)); llen -= l; /* Write out characters after, blank the tail and jump back to lpos. */ write_buf(lbuf + lpos, r); @@ -842,7 +842,7 @@ static int del_chars(int n) move_cursor(lpos, lpos-l); /* Move back */ /* Fix up buffer and buffer pointers. */ if (r > 0) - memcpy(lbuf + pos, lbuf + lpos, r * sizeof(Uint32)); + memmove(lbuf + pos, lbuf + lpos, r * sizeof(Uint32)); lpos -= l; llen -= l; /* Write out characters after, blank the tail and jump back to lpos. */ |