Ad
  • Custom User Avatar

    I think this code doesn't allocate enough space for the null terminator at the end of the string! As far as I can tell (from docs and quick experimentation), strlen() doesn't count the null terminator.