I created a new thread for this since my original was also including
TCL itself in the question, which isn't the case.

Thanks to Theo, Stuart, and Ted for the info they gave!

I emailed the following patch to Don Libes a couple weeks ago now
and have yet to hear even a peep back :(

In the interest of keeping the port working going forward, I propose
this diff, which is based off feedback I originally received.

I use the lang/expect package daily at $WORK so I can at least say
I haven't run into the issue with this patch applied.

Thoughts?  Tar and featherings?


? expect.diff
Index: patches/patch-exp_inter_c
===================================================================
RCS file: patches/patch-exp_inter_c
diff -N patches/patch-exp_inter_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-exp_inter_c   1 Apr 2015 22:47:50 -0000
@@ -0,0 +1,33 @@
+$OpenBSD$
+--- exp_inter.c.orig   Tue Aug 31 15:20:27 2010
++++ exp_inter.c        Wed Apr  1 15:46:05 2015
+@@ -1824,12 +1824,12 @@ got_action:
+                   skip += matchLen;
+                   size -= skip;
+                   if (size) {
+-                      memcpy(u->buffer, u->buffer + skip, size);
++                      memmove(u->buffer, u->buffer + skip, size);
+                   }
+               } else {
+                   if (skip) {
+                       size -= skip;
+-                      memcpy(u->buffer, u->buffer + skip, size);
++                      memmove(u->buffer, u->buffer + skip, size);
+                   }
+               }
+               Tcl_SetObjLength(size);
+@@ -2070,12 +2070,12 @@ got_action:
+                   skip += matchLen;
+                   size -= skip;
+                   if (size) {
+-                      memcpy(u->buffer, u->buffer + skip, size);
++                      memmove(u->buffer, u->buffer + skip, size);
+                   }
+               } else {
+                   if (skip) {
+                       size -= skip;
+-                      memcpy(u->buffer, u->buffer + skip, size);
++                      memmove(u->buffer, u->buffer + skip, size);
+                   }
+               }
+               Tcl_SetObjLength(size);

Reply via email to