This is where you should focus:
==2803== Invalid read of size 1
==2803== at 0x4026D37: strcpy (mc_replace_strmem.c:311)
==2803== by 0x804A152: route_advertise (in...
Type: Posts; User: rags_to_riches
This is where you should focus:
==2803== Invalid read of size 1
==2803== at 0x4026D37: strcpy (mc_replace_strmem.c:311)
==2803== by 0x804A152: route_advertise (in...
Good job on using valgrind. Now, what was the actual output of valgrind?