diff options
author | Lukas Larsson <[email protected]> | 2013-04-24 14:30:02 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-04-24 14:30:02 +0200 |
commit | 8c4e4f606e5b2f531ec737b677a9f89bff525033 (patch) | |
tree | 530430d607ede11c17c2bb513783e1a603311634 | |
parent | 92a788b3a39920f2bec24d0327f43826a5d7bd9b (diff) | |
parent | c3e3b87163abebd37f1b1ef40742634ea43dfba3 (diff) | |
download | otp-8c4e4f606e5b2f531ec737b677a9f89bff525033.tar.gz otp-8c4e4f606e5b2f531ec737b677a9f89bff525033.tar.bz2 otp-8c4e4f606e5b2f531ec737b677a9f89bff525033.zip |
Merge branch 'maint'
* maint:
Fix src/dest overlap in ttsl driver
fix valgrind error in erts/emulator/drivers/unix/ttsl_drv.c
-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. */ |