Could you try running it under valgrind to see what its exact memcpy
complaint is, perhaps an overlap?
Good news, I got lots of errors straight away:
==2623== Source and destination overlap in memcpy(0x517c1d0, 0x517c190, 145)
==2623== at 0x4C236BA: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C236E8: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c1cf is 1 bytes before a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C236F2: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c1ce is 2 bytes before a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C236FC: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c1cd is 3 bytes before a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C236E0: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c1cc is 4 bytes before a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C23740: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c190 is 0 bytes after a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A557: initialize_buffers (main.c:771)
==2623== by 0x40A624: main (main.c:794)
==2623==
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/Drafts
==2623== Invalid read of size 1
==2623== at 0x4C237B1: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c3d0 is 0 bytes after a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C23798: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c3d1 is 1 bytes after a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C2379F: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c3d2 is 2 bytes after a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C237A8: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c3d3 is 3 bytes after a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C237F0: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c491 is 1 bytes after a block of size 128 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x408E8D: ds_init (dstring.c:40)
==2623== by 0x408220: process_copy_pass (copypass.c:72)
==2623== by 0x40A632: main (main.c:798)
==2623==
==2623== Invalid read of size 1
==2623== at 0x4C23800: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c493 is 3 bytes after a block of size 128 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x408E8D: ds_init (dstring.c:40)
==2623== by 0x408220: process_copy_pass (copypass.c:72)
==2623== by 0x40A632: main (main.c:798)
==2623==
==2623== Syscall param write(buf) points to uninitialised byte(s)
==2623== at 0x4EE55A0: __write_nocancel (in /lib/libc-2.10.2.so)
==2623== by 0x40B68A: disk_empty_output_buffer (util.c:141)
==2623== by 0x4085EC: process_copy_pass (copypass.c:186)
==2623== by 0x40A632: main (main.c:798)
==2623== Address 0x517c1e0 is 16 bytes inside a block of size 512 alloc'd
==2623== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==2623== by 0x418C27: xmalloc (xmalloc.c:47)
==2623== by 0x40A59B: initialize_buffers (main.c:777)
==2623== by 0x40A624: main (main.c:794)
==2623==
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/SPAM
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/.imap
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/Junk
E-mail
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/Sent
Items
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/.subscriptions
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/mail
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/mail/Secunia
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/mail/Jobs
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/mail/Music
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/mail/force9
==2623==
==2623== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==2623== Access not within mapped region at address 0x557A000
==2623== at 0x4C23798: memcpy (mc_replace_strmem.c:482)
==2623== by 0x40BA7C: disk_buffered_write (util.c:283)
==2623== by 0x40C353: copy_files_disk_to_disk (util.c:562)
==2623== by 0x4085E2: process_copy_pass (copypass.c:185)
==2623== by 0x40A632: main (main.c:798)
==2623== If you believe this happened as a result of a stack
==2623== overflow in your program's main thread (unlikely but
==2623== possible), you can try to increase the size of the
==2623== main thread stack using the --main-stacksize= flag.
==2623== The main thread stack size used in this run was 4194304.
==2623==
==2623== FILE DESCRIPTORS: 5 open at exit.
==2623== Open file descriptor 4:
media/1d901e30-6139-4105-8f2f-055dc758dd40/mnt/gateway/home/njh/Mail/mail/FamilyTree
==2623== at 0x4EE5300: __open_nocancel (in /lib/libc-2.10.2.so)
==2623== by 0x40856A: process_copy_pass (copypass.c:170)
==2623== by 0x40A632: main (main.c:798)
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org