strcpy not acting as expected.

PaulS:
You allocate exactly enough space to hold username, then you write username, a colon, realm, another colon, and password to that space. How do you expect all that to fit?

I just figured that out. The website I read that told me about strcpy and strcat did not mention having to allocate enough memory for all of them concatenated together it just allocated memory for the first item in it's example. Guess I won't be using that website anymore... thanks for the response.