Code:
$ valgrind ./a.out
==3136== Memcheck, a memory error detector
==3136== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==3136== Using Valgrind-3.6.1-Debian and LibVEX; rerun with -h for copyright info
==3136== Command: ./a.out
==3136==
Enter your first name: Commander
Enter your last name: Z
==3136== Invalid write of size 1
==3136== at 0x4C29484: strcat (mc_replace_strmem.c:176)
==3136== by 0x400B56: main (in /home/sc/Documents/a.out)
==3136== Address 0x5973049 is 0 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136== Invalid write of size 1
==3136== at 0x4C29493: strcat (mc_replace_strmem.c:176)
==3136== by 0x400B56: main (in /home/sc/Documents/a.out)
==3136== Address 0x597304a is 1 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136== Invalid write of size 1
==3136== at 0x4C29495: strcat (mc_replace_strmem.c:176)
==3136== by 0x400B56: main (in /home/sc/Documents/a.out)
==3136== Address 0x597304c is 3 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136== Invalid read of size 1
==3136== at 0x4C29727: strlen (mc_replace_strmem.c:282)
==3136== by 0x4EC7800: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x400B74: main (in /home/sc/Documents/a.out)
==3136== Address 0x5973049 is 0 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136== Invalid read of size 1
==3136== at 0x51AC2B4: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1317)
==3136== by 0x51A1F9C: fwrite (iofwrite.c:45)
==3136== by 0x4EC7574: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x4EC780E: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x400B74: main (in /home/sc/Documents/a.out)
==3136== Address 0x597304b is 2 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136== Invalid read of size 1
==3136== at 0x51AC2C9: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1317)
==3136== by 0x51A1F9C: fwrite (iofwrite.c:45)
==3136== by 0x4EC7574: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x4EC780E: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x400B74: main (in /home/sc/Documents/a.out)
==3136== Address 0x597304a is 1 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136== Invalid read of size 1
==3136== at 0x51AC230: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1349)
==3136== by 0x51A1F9C: fwrite (iofwrite.c:45)
==3136== by 0x4EC7574: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x4EC780E: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x400B74: main (in /home/sc/Documents/a.out)
==3136== Address 0x5973049 is 0 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136== Invalid read of size 1
==3136== at 0x51AC23E: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1348)
==3136== by 0x51A1F9C: fwrite (iofwrite.c:45)
==3136== by 0x4EC7574: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x4EC780E: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16)
==3136== by 0x400B74: main (in /home/sc/Documents/a.out)
==3136== Address 0x597304a is 1 bytes after a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
Here's the information in a single string: Z, Commander
==3136== Mismatched free() / delete / delete []
==3136== at 0x4C27FF2: operator delete(void*) (vg_replace_malloc.c:387)
==3136== by 0x400B8D: main (in /home/sc/Documents/a.out)
==3136== Address 0x5973040 is 0 bytes inside a block of size 9 alloc'd
==3136== at 0x4C2864B: operator new[](unsigned long) (vg_replace_malloc.c:305)
==3136== by 0x400AF8: main (in /home/sc/Documents/a.out)
==3136==
==3136==
==3136== HEAP SUMMARY:
==3136== in use at exit: 0 bytes in 0 blocks
==3136== total heap usage: 1 allocs, 1 frees, 9 bytes allocated
==3136==
==3136== All heap blocks were freed -- no leaks are possible
==3136==
==3136== For counts of detected and suppressed errors, rerun with: -v
==3136== ERROR SUMMARY: 15 errors from 9 contexts (suppressed: 4 from 4)