patch-exp_inter_c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $OpenBSD: patch-exp_inter_c,v 1.2 2015/12/03 09:18:16 sthen Exp $
  2. --- exp_inter.c.orig Tue Aug 31 15:20:27 2010
  3. +++ exp_inter.c Tue Nov 17 10:45:17 2015
  4. @@ -1564,7 +1564,7 @@ Exp_InteractObjCmd(
  5. ustring = u->input.buffer;
  6. if (skip) {
  7. size -= skip;
  8. - memcpy(ustring, ustring + skip, size * sizeof(Tcl_UniChar));
  9. + memmove(ustring, ustring + skip, size * sizeof(Tcl_UniChar));
  10. }
  11. }
  12. u->input.use = size;
  13. @@ -1824,12 +1824,12 @@ got_action:
  14. skip += matchLen;
  15. size -= skip;
  16. if (size) {
  17. - memcpy(u->buffer, u->buffer + skip, size);
  18. + memmove(u->buffer, u->buffer + skip, size);
  19. }
  20. } else {
  21. if (skip) {
  22. size -= skip;
  23. - memcpy(u->buffer, u->buffer + skip, size);
  24. + memmove(u->buffer, u->buffer + skip, size);
  25. }
  26. }
  27. Tcl_SetObjLength(size);
  28. @@ -2070,12 +2070,12 @@ got_action:
  29. skip += matchLen;
  30. size -= skip;
  31. if (size) {
  32. - memcpy(u->buffer, u->buffer + skip, size);
  33. + memmove(u->buffer, u->buffer + skip, size);
  34. }
  35. } else {
  36. if (skip) {
  37. size -= skip;
  38. - memcpy(u->buffer, u->buffer + skip, size);
  39. + memmove(u->buffer, u->buffer + skip, size);
  40. }
  41. }
  42. Tcl_SetObjLength(size);